EmpireWorkflowJobDao extends EmpireDao implements WorkflowJobDao { @Override public Job create() { return new Job(); } EmpireWorkflowJobDao(ProarcDatabase db); @Override Job create(); @Override void update(Job job); @Override Job find(BigDecimal id); @Override List<JobView> view(JobFilter filter);  }
@Test public void testCreate() throws Exception { IDataSet db = database( support.loadFlatXmlDataStream(getClass(), "user.xml") ); support.cleanInsert(support.getConnection(tx), db); Job job = dao.create(); job.addCreated(dbTimestamp).addFinanced("financed").addLabel("label") .addNote("note").addOwnerId(BigDecimal.ONE).addPriority(1) .addProfileName("profile").setState(State.OPEN).addTimestamp(dbTimestamp); dao.update(job); tx.commit(); Job result = dao.find(job.getId()); assertNotNull(result); assertEquals(job.getCreated(), result.getCreated()); assertEquals(job.getFinanced(), result.getFinanced()); assertEquals(job.getId(), result.getId()); assertEquals(job.getLabel(), result.getLabel()); assertEquals(job.getNote(), result.getNote()); assertEquals(job.getOwnerId(), result.getOwnerId()); assertEquals(job.getPriority(), result.getPriority()); assertEquals(job.getProfileName(), result.getProfileName()); assertEquals(job.getState(), result.getState()); assertEquals(job.getTimestamp(), result.getTimestamp()); }