@Test
public void subqueries() {

    Junction j = new Conjunction(
            Restrictions.eq(property, testValue),
            Restrictions.between(property, testFrom, testTo),
            Restrictions.in(property, testValues),
            Restrictions.isNotNull(property)
    );
    String[] subqueries = translator.subqueries(j, entityClass);
    
    List<Criterion> criteria = j.getCriteria();
    assertEquals(criteria.size(), subqueries.length);
    
    for (int i = 0; i < subqueries.length; i++) {
        assertEquals(translator.translate(criteria.get(i), entityClass), subqueries[i]);
    }
}