EmrUiUtils { public List<SimpleObject> simpleRegimenDefinitions(Collection<RegimenDefinition> definitions, UiUtils ui) { return SimpleObject.fromCollection(definitions, ui, "name", "group.code", "components.drugRef", "components.dose", "components.units", "components.frequency" ); }  String formatDrug(DrugReference drugRef, UiUtils ui); String formatRegimenShort(RegimenOrder regimen, UiUtils ui); String formatRegimenLong(RegimenOrder regimen, UiUtils ui); SimpleObject simpleRegimen(RegimenOrder regimen, UiUtils ui); List<SimpleObject> simpleRegimenHistory(RegimenChangeHistory history, UiUtils ui); List<SimpleObject> simpleRegimenDefinitions(Collection<RegimenDefinition> definitions, UiUtils ui);  }
@Ignore @Test public void simpleRegimenDefinitions_shouldConvertToSimpleObjects() throws IOException, SAXException, ParserConfigurationException { List<SimpleObject> objs = kenyaUi.simpleRegimenDefinitions(regimenManager.getRegimenGroups("category1").get(0).getRegimens(), ui); Assert.assertThat(objs.get(0), hasEntry("name", (Object) "regimen1")); Assert.assertThat(((Map<String, Object>)objs.get(0).get("group")), hasEntry("code", (Object) "group1")); }