public void testDeleteUserMessages() throws Throwable {
Message message1 = this._helper.createMessage(null, "admin", "it", new Date(), "company1", "address1", "email1@miodominio.it", "note1");
this._helper.addMessage(message1);
String messageId1 = message1.getId();
assertNotNull(this._messageDao.loadEntityRecord(messageId1));
Answer answer1 = this._helper.createAnswer(null, messageId1, "admin", new Date(), "text1");
this._helper.addAnswer(answer1);
Answer answer2 = this._helper.createAnswer(null, messageId1, "admin", new Date(), "text2");
this._helper.addAnswer(answer2);
List<Answer> answers = this._messageDao.loadAnswers(messageId1);
assertEquals(2, answers.size());
Message message2 = this._helper.createMessage(null, "mainEditor", "it", new Date(), "company2", "address2", "email2@miodominio.it", "note2");
this._helper.addMessage(message2);
String messageId2 = message2.getId();
assertNotNull(this._messageDao.loadEntityRecord(messageId2));
Answer answer3 = this._helper.createAnswer(null, messageId2, "admin", new Date(), "text3");
this._helper.addAnswer(answer3);
answers = this._messageDao.loadAnswers(messageId2);
assertEquals(1, answers.size());
this._messageDao.deleteUserMessages("admin");