@Test
public void and() {

    Conjunction and = Restrictions.and(left, right);
    List<Criterion> criteria = and.getCriteria();
    assertEquals(Operator.AND, and.getOperator());
    assertEquals(2, criteria.size());
    assertEquals(left, criteria.get(0));
    assertEquals(right, criteria.get(1));
}