GeoBoxHandler extends BaseKlvHandler implements Trimmable { @Override public Optional<Attribute> asAttribute() { int minimumListSize = getMinimumListSize(); List<String> polygonsWkts = new ArrayList<>(); for (int i = 0; i < minimumListSize; i++) { polygonsWkts.add( String.format( "POLYGON ((%f %f, %f %f, %f %f, %f %f, %f %f))", map.get(longitude1).get(i), map.get(latitude1).get(i), map.get(longitude2).get(i), map.get(latitude2).get(i), map.get(longitude3).get(i), map.get(latitude3).get(i), map.get(longitude4).get(i), map.get(latitude4).get(i), map.get(longitude1).get(i), map.get(latitude1).get(i))); } return asAttribute(polygonsWkts); } GeoBoxHandler(
      String attributeName,
      String latitude1,
      String longitude1,
      String latitude2,
      String longitude2,
      String latitude3,
      String longitude3,
      String latitude4,
      String longitude4); String getLatitude1(); String getLatitude2(); String getLatitude3(); String getLatitude4(); String getLongitude1(); String getLongitude2(); String getLongitude3(); String getLongitude4(); Map<String, List<Double>> getRawGeoData(); @Override Optional<Attribute> asAttribute(); GeoBoxHandler asSubsampledHandler(int subsampleCount); @Override void trim(); @Override void accept(KlvDataElement klvDataElement); @Override void reset(); void accept(String name, Double value);  }
@Test public void testEmpty() { assertThat(geoBoxHandler.asAttribute().isPresent(), is(false)); }