@Override
	public void execute(String commandName, BufferedReader reader, BufferedWriter writer)
			throws Py4JException, IOException {
		String targetObjectId = reader.readLine();
		String methodName = reader.readLine();
		List<Object> arguments = getArguments(reader);

		ReturnObject returnObject = invokeMethod(methodName, targetObjectId, arguments);

		String returnCommand = Protocol.getOutputCommand(returnObject);
		logger.finest("Returning command: " + returnCommand);
		writer.write(returnCommand);
		writer.flush();
	}
@Test
	public void testStringMethodWithNull() {
		String inputCommand = target + "\nmethod4\nn\ne\n";
		try {
			command.execute("c", new BufferedReader(new StringReader(inputCommand)), writer);
			assertEquals("!yro1\n", sWriter.toString());
			assertEquals(3, ((ExampleClass) gateway.getObject("o1")).getField1());
		} catch (Exception e) {
			e.printStackTrace();
			fail();
		}
	}