@Test
public void within() {

    String xprop = "property.x";
    String yprop = "property.y";
    assertEquivalent(Restrictions.conjunction()
            .add(Restrictions.between(xprop, box.getA().getX(), box.getB().getX())) 
            .add(Restrictions.between(yprop, box.getA().getY(), box.getB().getY())
        ), translator.within(xprop, yprop, box));
}