small fixes to ethtype pattern

Change-Id: Ic58c426821952f66aa21bc828d36fd4f83d8da0d
diff --git a/core/common/src/main/java/org/onosproject/codec/impl/EncodeInstructionCodec.java b/core/common/src/main/java/org/onosproject/codec/impl/EncodeInstructionCodec.java
index 7fb56fd..20de446 100644
--- a/core/common/src/main/java/org/onosproject/codec/impl/EncodeInstructionCodec.java
+++ b/core/common/src/main/java/org/onosproject/codec/impl/EncodeInstructionCodec.java
@@ -119,7 +119,8 @@
                 final L2ModificationInstruction.PushHeaderInstructions pushHeaderInstructions =
                         (L2ModificationInstruction.PushHeaderInstructions) instruction;
 
-                result.put(InstructionCodec.ETHERNET_TYPE, pushHeaderInstructions.ethernetType());
+                result.put(InstructionCodec.ETHERNET_TYPE,
+                           pushHeaderInstructions.ethernetType().toShort());
                 break;
 
             default:
diff --git a/core/common/src/test/java/org/onosproject/codec/impl/FlowRuleCodecTest.java b/core/common/src/test/java/org/onosproject/codec/impl/FlowRuleCodecTest.java
index 2a93b55..9c778fb 100644
--- a/core/common/src/test/java/org/onosproject/codec/impl/FlowRuleCodecTest.java
+++ b/core/common/src/test/java/org/onosproject/codec/impl/FlowRuleCodecTest.java
@@ -247,15 +247,15 @@
         instruction = getInstruction(Instruction.Type.L2MODIFICATION,
                 L2ModificationInstruction.L2SubType.MPLS_PUSH.name());
         assertThat(instruction.type(), is(Instruction.Type.L2MODIFICATION));
-        assertThat((short) ((L2ModificationInstruction.PushHeaderInstructions) instruction)
-                        .ethernetType(),
+        assertThat(((L2ModificationInstruction.PushHeaderInstructions) instruction)
+                        .ethernetType().toShort(),
                 is(Ethernet.MPLS_UNICAST));
 
         instruction = getInstruction(Instruction.Type.L2MODIFICATION,
                 L2ModificationInstruction.L2SubType.MPLS_POP.name());
         assertThat(instruction.type(), is(Instruction.Type.L2MODIFICATION));
-        assertThat((short) ((L2ModificationInstruction.PushHeaderInstructions) instruction)
-                        .ethernetType(),
+        assertThat(((L2ModificationInstruction.PushHeaderInstructions) instruction)
+                        .ethernetType().toShort(),
                 is(Ethernet.MPLS_UNICAST));
 
         instruction = getInstruction(Instruction.Type.L2MODIFICATION,
diff --git a/core/common/src/test/java/org/onosproject/codec/impl/InstructionJsonMatcher.java b/core/common/src/test/java/org/onosproject/codec/impl/InstructionJsonMatcher.java
index 7281ed5..dbb3bd0 100644
--- a/core/common/src/test/java/org/onosproject/codec/impl/InstructionJsonMatcher.java
+++ b/core/common/src/test/java/org/onosproject/codec/impl/InstructionJsonMatcher.java
@@ -66,7 +66,7 @@
             return false;
         }
 
-        if (instructionToMatch.ethernetType() != ethJson.asInt()) {
+        if (instructionToMatch.ethernetType().toShort() != ethJson.asInt()) {
             description.appendText("ethernetType was " + ethJson);
             return false;
         }