@Test
public void testBadInstanciation() throws Exception {

    Style s = getStyle(AREA_RECODE);
    AreaSymbolizer as = (AreaSymbolizer) s.getRules().get(0).getCompositeSymbolizer().getChildren().get(0);
    try{
        CategorizedArea ca = new CategorizedArea(as);
        fail();
    } catch (IllegalArgumentException iae){
        assertTrue(true);
    }
}