@Override
    public GeometryState createGroupedState()
    {
        return new GroupedGeometryState();
    }
@Test
    public void testCreateGroupedStatePresent()
    {
        GeometryState state = factory.createGroupedState();
        assertNull(state.getGeometry());
        assertTrue(state instanceof GeometryStateFactory.GroupedGeometryState);
        GeometryStateFactory.GroupedGeometryState groupedState = (GeometryStateFactory.GroupedGeometryState) state;

        groupedState.setGroupId(1);
        assertNull(state.getGeometry());
        groupedState.setGeometry(OGCGeometry.fromText("POINT (1 2)"), 0);
        assertEquals(state.getGeometry(), OGCGeometry.fromText("POINT (1 2)"));

        groupedState.setGroupId(2);
        assertNull(state.getGeometry());
        groupedState.setGeometry(OGCGeometry.fromText("POINT (3 4)"), 0);
        assertEquals(state.getGeometry(), OGCGeometry.fromText("POINT (3 4)"));

        groupedState.setGroupId(1);
        assertNotNull(state.getGeometry());
    }