@Test public void simplify_shouldSimplify() { ConceptName name = new ConceptName(); name.setName("Test"); name.setLocale(CoreConstants.LOCALE); name.setLocalePreferred(true); Concept concept = new Concept(); concept.setId(123); concept.setNames(Collections.singletonList(name)); SimpleObject result = simplifier.simplify(concept); Assert.assertThat(result, hasEntry("id", (Object) 123)); Assert.assertThat(result, hasEntry("name", (Object) "Test")); }
@Override protected SimpleObject simplify(Concept concept) { SimpleObject ret = new SimpleObject(); ret.put("id", concept.getId()); ret.put("name", concept.getPreferredName(CoreConstants.LOCALE).getName()); return ret; }
ConceptSimplifier extends AbstractSimplifier<Concept> { @Override protected SimpleObject simplify(Concept concept) { SimpleObject ret = new SimpleObject(); ret.put("id", concept.getId()); ret.put("name", concept.getPreferredName(CoreConstants.LOCALE).getName()); return ret; } }
ConceptSimplifier extends AbstractSimplifier<Concept> { @Override protected SimpleObject simplify(Concept concept) { SimpleObject ret = new SimpleObject(); ret.put("id", concept.getId()); ret.put("name", concept.getPreferredName(CoreConstants.LOCALE).getName()); return ret; }  }
ConceptSimplifier extends AbstractSimplifier<Concept> { @Override protected SimpleObject simplify(Concept concept) { SimpleObject ret = new SimpleObject(); ret.put("id", concept.getId()); ret.put("name", concept.getPreferredName(CoreConstants.LOCALE).getName()); return ret; }   }
ConceptSimplifier extends AbstractSimplifier<Concept> { @Override protected SimpleObject simplify(Concept concept) { SimpleObject ret = new SimpleObject(); ret.put("id", concept.getId()); ret.put("name", concept.getPreferredName(CoreConstants.LOCALE).getName()); return ret; }    }