public void buildQuery() {
MockQueryBuilder builder = new MockQueryBuilder();
GenericSelectQuery<Person, Object> query = new GenericSelectQuery<Person, Object>(builder, Person.class);
Person toSearch = query.target();
query.eq(toSearch.getHome().getAddress(), toSearch.getDog().getHome().getAddress());
query.eq(toSearch.getDad().getHome(), toSearch.getDog().getHome());
query.eq(toSearch.getMom().getName(), toSearch.getDog().getOwner().getName());
query.order(toSearch.getName());
builder.build();
assertEquals("size of result conditions", 3, builder.getConditionsString().size());
assertEquals("first condition", "home.address EQUALS dog.home.address", builder.getConditionsString().get(0));
assertEquals("second condition", "dud.home EQUALS dog.home", builder.getConditionsString().get(1));
assertEquals("thirdth condition", "mum.name EQUALS dog.owner.name", builder.getConditionsString().get(2));