BlueprintDAO { @Transactional public void refresh(BlueprintEntity blueprintEntity) { ensureStackIdSet(blueprintEntity); entityManagerProvider.get().refresh(blueprintEntity); }  @RequiresSession BlueprintEntity findByName(String blueprint_name); @RequiresSession List<BlueprintEntity> findAll(); @Transactional void refresh(BlueprintEntity blueprintEntity); @Transactional void create(BlueprintEntity blueprintEntity); @Transactional BlueprintEntity merge(BlueprintEntity blueprintEntity); @Transactional void remove(BlueprintEntity blueprintEntity); @Transactional void removeByName(String blueprint_name);  }
@Test public void testRefresh() { BlueprintEntity entity = new BlueprintEntity(); entityManager.refresh(eq(entity)); replay(entityManager); BlueprintDAO dao = new BlueprintDAO(); dao.entityManagerProvider = entityManagerProvider; dao.refresh(entity); verify(entityManagerProvider, entityManager); }