VisitTypeSimplifier extends AbstractSimplifier<VisitType> { @Override protected SimpleObject simplify(VisitType visitType) { SimpleObject ret = new SimpleObject(); ret.put("id", visitType.getId()); ret.put("name", visitType.getName()); ret.put("description", visitType.getDescription()); return ret; }    }
@Test public void simplify_shouldSimplify() { VisitType visitType = new VisitType(); visitType.setId(123); visitType.setName("test"); visitType.setDescription("desc"); SimpleObject result = simplifier.simplify(visitType); Assert.assertThat(result, hasEntry("id", (Object) 123)); Assert.assertThat(result, hasEntry("name", (Object) "test")); Assert.assertThat(result, hasEntry("description", (Object) "desc")); }