@Test
public void testNot() {

    DataSource<Person> persons = storeOf( new Person("Mark", 37),
                                          new Person("Edson", 35),
                                          new Person("Mario", 40),
                                          new Person("Sofia", 3));
    // $oldest: Person()
    // not( Person(age > $oldest.age) )
    Variable<Person> oldestV = declarationOf( Person.class, new DataSourceDefinitionImpl( "persons", false) );
    Variable<Person> otherV = declarationOf( Person.class, new DataSourceDefinitionImpl( "persons", false) );
    View view = view(
            not(otherV, oldestV, (p1, p2) -> p1.getAge() > p2.getAge())
    );
    List<TupleHandle> result = new BruteForceEngine().bind("persons", persons).evaluate(view);
    assertEquals(1, result.size());
    TupleHandle tuple = result.get(0);
    assertEquals("Mario", tuple.get(oldestV).getName());
}