String name1 = "name1";
String category = "category";
Date date = new Date();
// init new Type1
Index2Type1 type1 = new Index2Type1();
type1.name = name1;
type1.category = category;
type1.dateCreate = date;
// indexing
IndexResponse index = type1.index();
// Read
Index2Type1 typeResult = Index2Type1.find.byId(index.getId());
assertThat(typeResult).isNotNull();
assertThat(typeResult.name).isEqualTo(name1);
assertThat(typeResult.category).isEqualTo(category);
assertThat(typeResult.dateCreate).isEqualTo(date);
assertThat(typeResult.getIndexPath().index).isEqualTo("index2");
assertThat(typeResult.getIndexPath().type).isEqualTo("type1");
}
});
}