### Question:
Handles { public static int opcodeToTag(int opcode) { switch (opcode) { case INVOKEVIRTUAL: return H_INVOKEVIRTUAL; case INVOKESTATIC: return H_INVOKESTATIC; case INVOKESPECIAL: return H_INVOKESPECIAL; case INVOKEINTERFACE: return H_INVOKEINTERFACE; default: throw new IllegalArgumentException("Unsupported opcode " + opcode); } }  static int getOpcode(Handle handle); static int opcodeToTag(int opcode); static int accessToTag(int access, boolean itf);  }### Answer:
@Test public void testOpcodeToTag() { assertThat(opcodeToTag(INVOKEVIRTUAL), is(H_INVOKEVIRTUAL)); assertThat(opcodeToTag(INVOKESTATIC), is(H_INVOKESTATIC)); assertThat(opcodeToTag(INVOKESPECIAL), is(H_INVOKESPECIAL)); assertThat(opcodeToTag(INVOKEINTERFACE), is(H_INVOKEINTERFACE)); }
@Test(expected = IllegalArgumentException.class) public void testOpcodeToTagNegative() { opcodeToTag(0); }