@Test public void testInvokeMethod() throws Exception { PojoRest model = new PojoRest(new AddressBook().init()); assertEquals("Person(name=Bill Clinton,age=65)", model.invokeMethod("0", "toString", "")); model = new PojoRest(new AddressBook().init(), JsonParser.DEFAULT); assertEquals("Person(name=Bill Clinton,age=65)", model.invokeMethod("0", "toString", "")); assertEquals("NY", model.invokeMethod("0/addresses/0/state", "toString", "")); assertNull(model.invokeMethod("1", "toString", "")); }