@Test
public void testDecimateRing() {

    // a long rectangle made of 5 coordinates
    LinearRing g = gf.createLinearRing(csf.create(new double[] {0,0,0,10,2,10,2,0,0,0}));
    assertTrue(g.isValid());
    
    Decimator d = new Decimator(4, 4);
    d.decimate(g);
    g.geometryChanged();
    assertTrue(g.isValid());
    assertEquals(4, g.getCoordinateSequence().size());
}