### Question:
ThrowOp extends MethodStateOp { @Override public void execute(ExecutionNode node, MethodState mState) { HeapItem item = mState.readRegister(register); mState.assignThrowRegister(item); } ThrowOp(MethodLocation location, int register); @Override void execute(ExecutionNode node, MethodState mState); @Override String toString();  }### Answer:
@Test public void canThrowNullPointerException() { ExecutionGraph graph = VMTester.execute(CLASS_NAME, "throwNullPointerException()V", initial); Class<?> exceptionClass = NullPointerException.class; HeapItem item = graph.getTerminatingRegisterConsensus(0); assertEquals(exceptionClass, item.getValue().getClass()); assertEquals(ClassNameUtils.toInternal(exceptionClass), item.getType()); HeapItem throwItem = graph.getTerminatingRegisterConsensus(MethodState.ThrowRegister); assertEquals(item, throwItem); VMTester.test(CLASS_NAME, "throwNullPointerException()V", expected); }