private void checkGeomInstance(Instance geomInstance) { assertTrue(geomInstance.getValue() instanceof Collection<?>); for (Object instance : ((Collection<?>) geomInstance.getValue())) { assertTrue(instance instanceof GeometryProperty<?>); @SuppressWarnings("unchecked") MultiPolygon multipolygon = ((GeometryProperty<MultiPolygon>) instance).getGeometry(); assertTrue( "Read geometry does not match the reference geometry", multipolygon.equalsExact(reference)); } }