@Test
public void script19()
throws EntityFinderException
{
// should return all Nameable entities with a name > "B" sorted by name
Nameable nameable = templateFor( Nameable.class );
List<String> largerThanB = new ArrayList<>();
for( String name : NameableAssert.allNames() )
{
if( name.compareTo( "B" ) > 0 )
{
largerThanB.add( name );
}
}
Collections.sort( largerThanB );
Iterable<EntityReference> entities = entityFinder.findEntities(
Nameable.class,
gt( nameable.name(), "B" ),
new OrderBy[]
{
orderBy( nameable.name() )
},
NO_FIRST_RESULT, NO_MAX_RESULTS,
NO_VARIABLES );
assertNames( false, entities, largerThanB.toArray( new String[ largerThanB.size() ] ) );
}