}
}
public void testAddLoadTicketOperation() throws Throwable {
String code = "code";
Ticket ticket = this._helper.createTicket(code, new Date(), "nome", "cognome", "codFisc", "comune",
"localita", "indT", "indirizzo", "numInd", "telefono", "email@email.itte", "message",
"mainEditor", 0, 1, 0, "admin", "pageManager", Ticket.STATES_OPENED, null, false);
try {
assertEquals(0, this._ticketDAO.searchTicketIds(null).size());
this._ticketDAO.addTicket(ticket);
assertEquals(1, this._ticketDAO.searchTicketIds(null).size());
Ticket modifiedTicket = this._helper.createTicket(code, new Date(), "nome2", "cognome2", "codFisc2", "comune2",
"localita2", "ind2", "indirizzo2", "num2", "telefono2", "email2@email.itte", "message2", "editorCustomers",
1, 0, 1, "mainEditor", null, Ticket.STATES_ASSIGNED, new Date(), true);
TicketOperation operation1 = this._helper.createTicketOperation(1, code, "editorCustomers", TicketOperation.OPERATIONS_ANSWER, "note1", 0, 0, "pageManager", new Date());
this._ticketDAO.updateTicketWithOperation(modifiedTicket, operation1);
Ticket updatedTicket = this._ticketDAO.loadTicket(code);
this.compareTickets(modifiedTicket, updatedTicket);
TicketOperation operation2 = this._helper.createTicketOperation(2, code, "mainEditor", TicketOperation.OPERATIONS_UPDATE, "note2", 0, 0, null, new Date());
this._ticketDAO.updateTicketWithOperation(ticket, operation2);
updatedTicket = this._ticketDAO.loadTicket(code);