@Ignore @Test public void testCopySiteCoordinates() { GatheringSiteCoordinates siteCoordinates = new GatheringSiteCoordinates(); siteCoordinates.setLongitudeDecimal(5.016667); siteCoordinates.setLatitudeDecimal(51.433333); List<GatheringSiteCoordinates> coordinates = new ArrayList<>(); coordinates.add(siteCoordinates); Object obj = ReflectionUtil.callStatic(SummaryObjectUtil.class, "copySiteCoordinates", new Class[] {List.class}, new Object[] {coordinates}); List<SummaryGatheringSiteCoordinates> actual = (List<SummaryGatheringSiteCoordinates>) obj; Double expectedLatitude = 51.433333; Double expectedLongitude = 5.016667; assertNotNull(actual); assertEquals("01", expectedLatitude, actual.get(0).getGeoShape().getCoordinates().getLatitude(), .000001); assertEquals("02", expectedLongitude, actual.get(0).getGeoShape().getCoordinates().getLongitude(), .000001); }
private static List<SummaryGatheringSiteCoordinates> copySiteCoordinates( List<GatheringSiteCoordinates> coords) { if (coords == null) { return null; } List<SummaryGatheringSiteCoordinates> summaries = new ArrayList<>(coords.size()); SummaryGatheringSiteCoordinates summary; for (GatheringSiteCoordinates coord : coords) { summary = new SummaryGatheringSiteCoordinates(coord.getGeoShape()); summaries.add(summary); } return summaries; }
SummaryObjectUtil { private static List<SummaryGatheringSiteCoordinates> copySiteCoordinates( List<GatheringSiteCoordinates> coords) { if (coords == null) { return null; } List<SummaryGatheringSiteCoordinates> summaries = new ArrayList<>(coords.size()); SummaryGatheringSiteCoordinates summary; for (GatheringSiteCoordinates coord : coords) { summary = new SummaryGatheringSiteCoordinates(coord.getGeoShape()); summaries.add(summary); } return summaries; } }
SummaryObjectUtil { private static List<SummaryGatheringSiteCoordinates> copySiteCoordinates( List<GatheringSiteCoordinates> coords) { if (coords == null) { return null; } List<SummaryGatheringSiteCoordinates> summaries = new ArrayList<>(coords.size()); SummaryGatheringSiteCoordinates summary; for (GatheringSiteCoordinates coord : coords) { summary = new SummaryGatheringSiteCoordinates(coord.getGeoShape()); summaries.add(summary); } return summaries; } private  SummaryObjectUtil(); }
SummaryObjectUtil { private static List<SummaryGatheringSiteCoordinates> copySiteCoordinates( List<GatheringSiteCoordinates> coords) { if (coords == null) { return null; } List<SummaryGatheringSiteCoordinates> summaries = new ArrayList<>(coords.size()); SummaryGatheringSiteCoordinates summary; for (GatheringSiteCoordinates coord : coords) { summary = new SummaryGatheringSiteCoordinates(coord.getGeoShape()); summaries.add(summary); } return summaries; } private  SummaryObjectUtil(); static SummarySpecimen copySpecimen(Specimen specimen, String nameGroup); static SummaryTaxon copyTaxon(Taxon taxon); static SummaryScientificName copyScientificName(ScientificName sn); static SummaryVernacularName copySummaryVernacularName(VernacularName vn); static SummarySourceSystem copySourceSystem(SourceSystem ss); }
SummaryObjectUtil { private static List<SummaryGatheringSiteCoordinates> copySiteCoordinates( List<GatheringSiteCoordinates> coords) { if (coords == null) { return null; } List<SummaryGatheringSiteCoordinates> summaries = new ArrayList<>(coords.size()); SummaryGatheringSiteCoordinates summary; for (GatheringSiteCoordinates coord : coords) { summary = new SummaryGatheringSiteCoordinates(coord.getGeoShape()); summaries.add(summary); } return summaries; } private  SummaryObjectUtil(); static SummarySpecimen copySpecimen(Specimen specimen, String nameGroup); static SummaryTaxon copyTaxon(Taxon taxon); static SummaryScientificName copyScientificName(ScientificName sn); static SummaryVernacularName copySummaryVernacularName(VernacularName vn); static SummarySourceSystem copySourceSystem(SourceSystem ss);  }