private void assertElementsInIndex(int expected) {
HSQuery hsQuery = searchFactory.createHSQuery();
hsQuery
.luceneQuery( new MatchAllDocsQuery() )
.targetedEntities( Arrays.asList( new Class<?>[]{ Book.class, Dvd.class } ) );
int resultSize = hsQuery.queryResultSize();
Assert.assertEquals( expected, resultSize );
}
private void storeBook(int id, String string) {
Book book = new Book();