}
}
public void testCreateAndUpdateAndRemoveInvoice() throws Exception {
log.warn("Creating a invoice");
Invoice invoice = new Invoice("invoice", "description");
dao.saveInvoice(invoice);
Integer id = invoice.getId();
invoice = dao.getInvoice(id);
assertEquals(invoice.getName(), "invoice");
assertEquals(invoice.getDescription(), "description");
log.warn("Invoice created: " + invoice);
invoice.setName("newinvoice");
invoice.setDescription("other description");
dao.saveInvoice(invoice);
log.warn("Invoice updated");
invoice = dao.getInvoice(id);
assertEquals(invoice.getName(), "newinvoice");
assertEquals(invoice.getDescription(), "other description");
log.warn("Invoice: " + invoice);
dao.removeInvoice(invoice);
}