@Test public void shouldDeserializeJsonObject() { String json = "{'name':'testName'}"; Type type = new TypeToken<TestRecord>() {}.getType(); final Object jsonObject = reader.readFromStream(new ByteArrayInputStream(json.getBytes()), type); assertTrue(jsonObject instanceof TestRecord); assertEquals("testName", ((TestRecord) jsonObject).name); }