// Let's clear event request
clearEvent(requestID);
// Make NewInstance
TaggedObject newObject = makeNewInstance(typeIDChild, targetThreadID,
targetConstructorID, 2 /* test number */);
// Make InvokeMethod: nonvirtual child method without exception
CommandPacket packet = new CommandPacket(
JDWPCommands.ObjectReferenceCommandSet.CommandSetID,
JDWPCommands.ObjectReferenceCommandSet.InvokeMethodCommand);
packet.setNextValueAsObjectID(newObject.objectID);
packet.setNextValueAsThreadID(targetThreadID);
packet.setNextValueAsClassID(typeIDChild);
packet.setNextValueAsMethodID(targetMethodIDChild);
packet.setNextValueAsInt(1);
packet.setNextValueAsValue(new Value(false));
packet.setNextValueAsInt(JDWPConstants.InvokeOptions.INVOKE_NONVIRTUAL);
logWriter.println
("\nSend ObjectReference.InvokeMethod:: nonvirtual child method without exception...");
ReplyPacket reply = debuggeeWrapper.vmMirror.performCommand(packet);
checkReplyPacket(reply, "ObjectReference::InvokeMethod command");
Value returnValue = reply.getNextValueAsValue();
logWriter.println(" ObjectReference.InvokeMethod: returnValue.getIntValue()="
+ returnValue.getIntValue());
TaggedObject exception = reply.getNextValueAsTaggedObject();
logWriter.println(" ObjectReference.InvokeMethod: exception.tag="
+ exception.tag + " exception.objectID=" + exception.objectID);
assertTrue("returnValue must be != null", returnValue != null);
assertEquals("Invalid value,", 456, returnValue.getIntValue());