### Question:
BlueprintDAO { @Transactional public void create(BlueprintEntity blueprintEntity) { ensureStackIdSet(blueprintEntity); entityManagerProvider.get().persist(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);  }### Answer:
@Test public void testCreate() { BlueprintEntity entity = new BlueprintEntity(); entityManager.persist(eq(entity)); replay(entityManager); BlueprintDAO dao = new BlueprintDAO(); dao.entityManagerProvider = entityManagerProvider; dao.create(entity); verify(entityManagerProvider, entityManager); }