@Before public void setUp() throws Exception { client = new Client(); client.setName("test"); client.setAuditFlag("C"); client.setCreatedBy(0); client.setCreatedTimeStamp(Calendar.getInstance().getTime()); }
@Test public void testFindByIdWithClientServiceShouldPass() throws Exception { client.setName("test findById"); clientService.create(client); Integer insertedId = client.getId(); Client result = clientService.findById(insertedId); assertThat(result.getName(), is("test findById")); }