public static void assertOrderAssignable( SimpleFeatureType expected, SimpleFeatureType actual){
// check feature type name
String expectedName = expected.getName().getLocalPart();
String actualName = actual.getName().getLocalPart();
if( !expectedName.equals( actualName ) ){
throw new IllegalAttributeException("Expected '"+expectedName+"' but was supplied '"+actualName+"'.");
}
// check attributes names
if( expected.getAttributeCount() != actual.getAttributeCount() ){
throw new IllegalAttributeException("Expected "+expected.getAttributeCount()+" attributes, but was supplied "+actual.getAttributeCount() );
}
for( int i=0; i< expected.getAttributeCount(); i++){
Class<?> expectedBinding = expected.getDescriptor(i).getType().getBinding();
Class<?> actualBinding = actual.getDescriptor(i).getType().getBinding();
if( !actualBinding.isAssignableFrom( expectedBinding )){