@Test
public void persistStatus() throws JsonParseException, JsonMappingException, IOException {
ObjectMapper mapper = new ObjectMapper();
StringWriter writer = new StringWriter();
IOUtils.copy(PersistTest.class.getResourceAsStream("/status.json"), writer, "UTF-8");
P2jPlanStatus p = mapper.readValue(PersistTest.class.getResourceAsStream("/status.json"), P2jPlanStatus.class);
EntityTransaction et = em.getTransaction();
et.begin();
em.persist(p);
em.flush();
et.commit();
P2jPlanStatus p2 = em.find(P2jPlanStatus.class, p.getId());
String j = mapper.writeValueAsString(p);
String j2 = mapper.writeValueAsString(p2);
Assert.assertEquals(j2, j);
}