@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);
}