@Test
public void testCreateDelete() {
EntityManager em = em();
Product p = new Product();
p.setTitle("test");
em.getTransaction().begin();
em.persist(p);
em.getTransaction().commit();
long id = p.getProductId();
assertTrue("product id set", id != 0);
p = em.find(Product.class ,id);
assertNotNull("find by id", p);
assertEquals("id", id, p.getProductId());
assertEquals("title", "test", p.getTitle());
em.getTransaction().begin();
em.remove(p);
em.getTransaction().commit();