@Test
public void testPredicate() {

    Car redCar = CarFactory.createCar(1);
    Car blueCar = CarFactory.createCar(7);
    Predicate<Car> predicate = predicate(equal(Car.COLOR, Car.Color.BLUE));
    assertFalse(predicate.test(redCar));
    assertTrue(predicate.test(blueCar));
}