### Question:
VarInsnNode extends AbstractInsnNode { public void setOpcode(final int opcode) { this.opcode = opcode; } VarInsnNode(final int opcode, final int var); void setOpcode(final int opcode); @Override int getType(); @Override void accept(final MethodVisitor methodVisitor); @Override AbstractInsnNode clone(final Map<LabelNode, LabelNode> clonedLabels); public int var; }### Answer:
@Test public void testSetOpcode() { VarInsnNode varInsnNode = new VarInsnNode(Opcodes.ALOAD, 123); varInsnNode.setOpcode(Opcodes.ASTORE); assertEquals(Opcodes.ASTORE, varInsnNode.getOpcode()); }