@Ignore @Test public void install_shouldInstallAllMetadata() throws Exception { List<Location> locations = locationService.getAllLocations(true); Assert.assertThat(locations, hasSize(3)); long start = System.currentTimeMillis(); facilityMetadata.install(); long time = System.currentTimeMillis() - start; System.out.println("** Loaded locations in " + time + " ms **"); locations = locationService.getAllLocations(true); Assert.assertThat(locations, hasSize(9502)); Facility facility1 = new Facility(kenyaEmrService.getLocationByMflCode("10001")); Assert.assertThat(facility1.getTarget().getName(), is("Abel Migwi Johana Laboratory")); Assert.assertThat(facility1.getTarget().getDescription(), is("Laboratory (Stand-alone)")); Assert.assertThat(facility1.getCountry(), is("Kenya")); Assert.assertThat(facility1.getProvince(), is("Central")); Assert.assertThat(facility1.getCounty(), is("Kirinyaga")); Assert.assertThat(facility1.getDistrict(), is("Kirinyaga West")); Assert.assertThat(facility1.getDivision(), is("Ndia")); Assert.assertThat(facility1.getPostCode(), is("10100")); Assert.assertThat(facility1.getTelephoneMobile(), nullValue()); Assert.assertThat(facility1.getTelephoneLandline(), nullValue()); Assert.assertThat(facility1.getTelephoneFax(), nullValue()); Facility facility2 = new Facility(kenyaEmrService.getLocationByMflCode("10002")); Assert.assertThat(facility2.getTarget().getName(), is("Aberdare Medical & Surgical Clinic")); Assert.assertThat(facility2.getTarget().getDescription(), is("Medical Clinic")); Assert.assertThat(facility2.getCountry(), is("Kenya")); Assert.assertThat(facility2.getProvince(), is("Central")); Assert.assertThat(facility2.getCounty(), is("Nyeri")); Assert.assertThat(facility2.getDistrict(), is("Nyeri South")); Assert.assertThat(facility2.getDivision(), is("Othaya")); Assert.assertThat(facility2.getPostCode(), is("10100")); Assert.assertThat(facility2.getTelephoneMobile(), is("0721-348224")); Assert.assertThat(facility2.getTelephoneLandline(), nullValue()); Assert.assertThat(facility2.getTelephoneFax(), nullValue()); Context.flushSession(); Context.clearSession(); start = System.currentTimeMillis(); facilityMetadata.install(); time = System.currentTimeMillis() - start; System.out.println("** Loaded locations in " + time + " ms **"); }
@Override public void install() throws Exception { install(true); }
FacilityMetadata extends AbstractMetadataBundle { @Override public void install() throws Exception { install(true); } }
FacilityMetadata extends AbstractMetadataBundle { @Override public void install() throws Exception { install(true); }  }
FacilityMetadata extends AbstractMetadataBundle { @Override public void install() throws Exception { install(true); }  @Override void install(); void install(boolean full); }
FacilityMetadata extends AbstractMetadataBundle { @Override public void install() throws Exception { install(true); }  @Override void install(); void install(boolean full);  }