@Test
public void testAllAnd() {

    IndexedCollection<Integer> indexedCollection = new ConcurrentIndexedCollection<Integer>();
    indexedCollection.addAll(asList(1, 2, 3, 4, 5));
    IndexedCollection<Integer> collection = indexedCollection;
    final And<Integer> query = and(
            all(Integer.class),
            lessThan(selfAttribute(Integer.class), 3)
    );
    ResultSet<Integer> results = collection.retrieve(query);
    assertEquals(2, results.size());
    assertTrue(results.iterator().hasNext());
}