SimpleFeatureCollection featureCollection;
featureCollection = (SimpleFeatureCollection) featureCollections.get(0);
assertEquals(5, featureCollection.size());
assertNotNull(featureCollection.getBounds().getCoordinateReferenceSystem());
SimpleFeatureIterator features = featureCollection.features();
try {
assertTrue(features.hasNext());
SimpleFeature f = features.next();
assertEquals("PrimitiveGeoFeature.f001", f.getID());
assertNull(f.getDefaultGeometry());
assertNotNull(f.getAttribute("pointProperty"));
Point p = (Point) f.getAttribute("pointProperty");
assertEquals(39.73245, p.getX(), 0.1);
assertEquals(2.00342, p.getY(), 0.1);
Object intProperty = f.getAttribute("intProperty");
assertNotNull(intProperty);
assertTrue(intProperty.getClass().getName(), intProperty instanceof BigInteger);
assertEquals(BigInteger.valueOf(155), intProperty);
assertEquals(new URI("http://www.opengeospatial.org/"), f.getAttribute("uriProperty"));
assertEquals(new Float(12765.0), f.getAttribute("measurand"));
assertTrue(f.getAttribute("dateProperty") instanceof Date);
assertEquals(BigDecimal.valueOf(5.03), f.getAttribute("decimalProperty"));
} finally {
if( features != null ){
features.close();
}
}
}