@Test
public void testUpdateOnRename() throws Exception {

    SimpleFeatureStore transformed = (SimpleFeatureStore) transformWithRename();
    
    // modify the feature
    transformed.modifyFeatures("people", 0, CQL.toFilter("name = 'Illinois'"));
    
    // check it has been modified
    assertEquals(1, STATES.getFeatures(new Query(null, CQL.toFilter("persons = 0"))).size());
    SimpleFeatureCollection rfc = transformed.getFeatures(new Query(null, CQL.toFilter("people = 0")));
    assertEquals(1, rfc.size());
    
    // double check the features themselves
    SimpleFeatureIterator fi = rfc.features();
    try {
        assertTrue(fi.hasNext());
        SimpleFeature sf = fi.next();
        assertEquals("Illinois", sf.getAttribute("name"));
    } finally {
        fi.close();
    }
}