* Run the actual query. Assert sizes to verify everything else is working.
* @param expected number of elements found in the index
*/
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 );
}