@Test
public void linearizePolygon() {

    Polygon polygon = new DefaultPolygon( null, null, null, createExteriorRing(), createInteriorRings() );
    Polygon res = linearizer.linearize( polygon, new MaxErrorCriterion( MAX_ERROR, MAX_POINTS ) );
    LOG.debug( "exterior ring:" );
    for ( Curve curve : res.getExteriorRing().getMembers() ) {
        for ( Point p : curve.getControlPoints() ) {
            LOG.debug( p.get0() + ", " + p.get1() );
        }
    }
    for ( Points pts : res.getInteriorRingsCoordinates() ) {
        LOG.debug( "interior ring:" );
        for ( int i = 0; i < pts.size(); i++ )
            LOG.debug( pts.get( i ).get0() + ", " + pts.get( i ).get1() );
    }
}