@Test
public void testFooOrdered() {

	Foo foo = new Foo();
	Bar bar = new Bar();
	Iterator<Foo> descending = repository.query(foo)
			.list(Order.descending(foo.barP, bar.intP), //
					Order.descending(foo.barP, bar.stringP)) //
			.iterator();
	assertTrue(descending.hasNext());
	assertTrue(descending.next().getClass() == Foo.class);
	assertTrue(descending.hasNext());
	assertTrue(descending.next().getClass() == FooEx.class);
	assertFalse(descending.hasNext());
	Iterator<Foo> ascending = repository.query(foo)
			.list(Order.ascending(foo.barP, bar.intP), //
					Order.ascending(foo.barP, bar.stringP)) //
			.iterator();
	assertTrue(ascending.hasNext());
	assertTrue(ascending.next().getClass() == FooEx.class);
	assertTrue(ascending.hasNext());
	assertTrue(ascending.next().getClass() == Foo.class);
	assertFalse(ascending.hasNext());
}