StatisticsDatabase { public static String getGeomName(String nameColumn, SimpleFeature simpleFeature, String geomId) { final String geomName; final Object simpleFeatureAttribute = simpleFeature.getAttribute(nameColumn); if (simpleFeatureAttribute != null) { geomName = simpleFeatureAttribute.toString(); } else { geomName = geomId; } return geomName; } StatisticsDatabase(String nameColumn); ObservationYear[] getYears(); ParameterName[] getParameterNames(ObservationYear year); static void main(String[] args); DatabaseRecord[] getData(ObservationYear year, ParameterName parameterName); void append(ProductData.UTC date, FeatureCollection<SimpleFeatureType, SimpleFeature> shapeCollection, Properties mapping); static String getGeomName(String nameColumn, SimpleFeature simpleFeature, String geomId);  }
@Test public void testGetGeomName() throws Exception { assertEquals("theName", StatisticsDatabase.getGeomName("ColumnName", UtilTest.createFeature("ColumnName", "theName"), "12")); assertEquals("12", StatisticsDatabase.getGeomName(null, UtilTest.createFeature("ColumnName", "theName"), "12")); }