@Test
public void testCountWithTransform() throws Exception {

    SimpleFeatureSource transformed = transformWithSelection();
    int actual = transformed.getCount(Query.ALL);
    int expected = STATES.getCount(Query.ALL);
    assertEquals(expected, actual);
    actual = STATES.getCount(new Query("states", CQL.toFilter("state_name = 'Illinois'")));
    expected = transformed.getCount(new Query("bstates", CQL.toFilter("name = 'illinois'")));
    assertEquals(expected, actual);
}