public void setFlushModeAuto() {
entityManager.setFlushMode(FlushModeType.AUTO);
assertEquals(entityManager.getFlushMode(), FlushModeType.AUTO,
"The flush mode was not set.");
EBStore ebstoreBeforeChange = entityManager.find(EBStore.class, ENTITY_ID);
ebstoreBeforeChange.setName(ENTITY_NAME_2);
// forces a flush
entityManager.createQuery("SELECT e FROM EBStore e");
// verifies if the flush was made
EBStore ebstoreAfterChange = entityManager.find(EBStore.class, ENTITY_ID);
assertEquals(ebstoreAfterChange.getName(), ENTITY_NAME_2, "The container did not make a flush after the query");
}