@Test
public void annotatedIndexFieldIsNull()
{
PojoWithAnnotatedFields pojo = new PojoWithAnnotatedFields();
RiakIndexes rIndex = new RiakIndexes();
AnnotationUtil.getIndexes(rIndex, pojo);
// The indexes should be created, but be empty
assertFalse(rIndex.isEmpty());
assertEquals(9, rIndex.size());
assertTrue(rIndex.hasIndex(StringBinIndex.named("favorite_languages")));
assertTrue(rIndex.getIndex(StringBinIndex.named("favorite_languages")).isEmpty());
assertTrue(rIndex.hasIndex(LongIntIndex.named("longs")));
assertTrue(rIndex.getIndex(LongIntIndex.named("longs")).isEmpty());
assertTrue(rIndex.hasIndex(StringBinIndex.named("lucky_language")));
assertTrue(rIndex.getIndex(StringBinIndex.named("lucky_language")).isEmpty());
assertTrue(rIndex.hasIndex(LongIntIndex.named("lucky_longlong")));
assertTrue(rIndex.getIndex(LongIntIndex.named("lucky_longlong")).isEmpty());
// TODO: chuck long support
assertTrue(rIndex.hasIndex(LongIntIndex.named("lucky_long")));
assertEquals(1, rIndex.getIndex(LongIntIndex.named("lucky_long")).size());
}