@Test
public void testStringMatchesRegex() {

    Query<String> query = matchesRegex(selfAttribute(String.class), "f.*");
    IndexedCollection<String> indexedCollection = new ConcurrentIndexedCollection<String>();
    indexedCollection.addAll(asList("foo1", "foo2", "bar", "baz", "car"));
    IndexedCollection<String> collection = indexedCollection;
    ResultSet<String> results = collection.retrieve(query);
    assertEquals(2, results.size());
    assertTrue(results.iterator().hasNext());
}