QueryableIndex { public Where getObjectTypes() { return new Where("ObjectTypes"); } QueryableIndex(final Rules rules,
                          final Columns columns,
                          final ObjectTypes objectTypes); Where getRules(); Where getColumns(); Where getObjectTypes();  }
@Test public void makeSureFirstAndLastObjectTypesAreTheSame() throws Exception { queryableIndex.getObjectTypes() .where(ObjectType.type() .is("Person")) .select() .first(objectTypeQueryCallback); verify(objectTypeQueryCallback).callback(objectTypeArgumentCaptor.capture()); final ObjectType first = objectTypeArgumentCaptor.getValue(); reset(objectTypeQueryCallback); queryableIndex.getObjectTypes() .where(ObjectType.type() .is("Person")) .select() .last(objectTypeQueryCallback); verify(objectTypeQueryCallback).callback(objectTypeArgumentCaptor.capture()); final ObjectType last = objectTypeArgumentCaptor.getValue(); assertEquals("Person", first.getType()); assertEquals(first, last); }