@Test
public void testCollectionEqSize()
{

    Query query = Query.from( schemaService.getDynamicSchema( DataElementGroup.class ) );
    query.setObjects( dataElementGroups );
    query.add( Restrictions.eq( "dataElements", 3 ) );
    List<? extends IdentifiableObject> objects = queryEngine.query( query );
    assertEquals( 2, objects.size() );
}