/** Test of createBeleg method, of class BelegService. */ @Test public void testCreateBeleg() throws Exception { System.out.println("createBeleg"); BelegDTO expResult = createTestBeleg(); BelegDTO result = testee.createBeleg(expResult); assertNotNull("Beleg.ID ==null", result.getId()); assertTrue("Beleg.ID ==0", result.getId() > 0); compareBelege(expResult, result); testee.deleteBeleg(result); BelegDTO delBeleg = null; try { delBeleg = testee.loadBelegById(result.getBelegTyp(), result.getId()); } catch (TomException tomException) { // Excpected } assertNull("Error deleting Beleg " + delBeleg, delBeleg); }