* @param id the entity primary key.
* @param name the entity name.
* @param newName the name that the entity receives after to be detached.
*/
public void refreshEBStore(final int id, final String name, final String newName) {
EBStore ebstore = completeEBStore(id, name);
em.persist(ebstore);
//makes the entity detached
em.clear();
//changes the entity name
ebstore.setName(newName);
//makes a refresh
em.refresh(ebstore);
//verifies if the container got the values from the database.
assertEquals(ebstore.getName(), name, "The entity was not refreshed");
}