EntityManager em = emf.createEntityManager();
em.getTransaction().begin();
for ( Task task : tasks ) {
// for this one we put the task in directly;
em.persist( task );
}
em.getTransaction().commit();
// now create a new service, to see if it initiates from the DB correctly
MockEscalatedDeadlineHandler handler = new MockEscalatedDeadlineHandler();