@Test 
public void testInsertOnTransform() throws Exception {

    SimpleFeatureStore transformed = (SimpleFeatureStore) transformWithPartialTransform();
    SimpleFeatureBuilder fb = new SimpleFeatureBuilder(transformed.getSchema());
    fb.add(wkt.read("POINT (-120 40)").buffer(3));
    fb.add("baloon");
    fb.add(1);
    fb.add(1);
    SimpleFeature sf = fb.buildFeature("states_mini.11");
    
    // add the feature
    transformed.addFeatures(DataUtilities.collection(sf));
    
    // check it's there
    int size = STATES.getCount(Query.ALL);
    assertEquals(11, size);
    
    // the name won't be preserved since it's transformed, we use the population instead
    assertEquals(1, STATES.getFeatures(new Query(null, CQL.toFilter("persons = 1"))).size());
    assertEquals(1, transformed.getFeatures(new Query(null, CQL.toFilter("people = 1"))).size());
}