### Question:
Block { public void remove(Instruction instruction) { if (instruction.getOwner() != this) { throw new IllegalArgumentException("The specified Instruction is not a child of this block.."); } instructions.remove(instruction); instruction.setOwner(null); }  void add(Instruction instruction); void remove(Instruction instruction); Instruction last(); Instruction previous(Instruction instruction);  }### Answer:
@Test void testRemove() { var block = new Block(new Label(0, "block")); var instruction = dummyInstruction(); block.add(instruction); assertEquals(1, block.getInstructions().size()); block.remove(instruction); assertEquals(0, block.getInstructions().size()); }