App { public static void main( String[] args ) { List<Creature> creatures = Arrays.asList(new Goblin(), new Octopus(), new Dragon(), new Shark(), new Troll(), new KillerBee()); System.out.println("Find all walking creatures"); List<Creature> walkingCreatures = creatures.stream().filter(new MovementSelector(Movement.WALKING)).collect(Collectors.toList()); walkingCreatures.stream().forEach(System.out::println); System.out.println("Find all dark creatures"); List<Creature> darkCreatures = creatures.stream().filter(new ColorSelector(Color.DARK)).collect(Collectors.toList()); darkCreatures.stream().forEach(System.out::println); System.out.println("Find all red and flying creatures"); List<Creature> redAndFlyingCreatures = creatures.stream().filter(new ColorSelector(Color.RED).and(new MovementSelector(Movement.FLYING))).collect(Collectors.toList()); redAndFlyingCreatures.stream().forEach(System.out::println); }  static void main( String[] args );  }
@Test public void test() { String[] args = {}; App.main(args); }