*/
public void testNotification() throws Exception {
login("lenya");
Session session = getFactory().getSession();
User lenya = getAccreditableManager().getUserManager().getUser("lenya");
User alice = getAccreditableManager().getUserManager().getUser("alice");
Identifiable[] recipients = { alice };
Message message = new Message(SUBJECT, new String[0], "body", new String[0], lenya,
recipients);
NotificationEventDescriptor descr = new NotificationEventDescriptor(message);
RepositoryEvent event = RepositoryEventFactory.createEvent(getManager(), session,
getLogger(), descr);
event.setNodeUri(getFactory().getPublication("test").getArea("authoring").getSite()
.getNode("/index").getLink("en").getDocument().getRepositoryNode().getSourceURI());
session.enqueueEvent(event);
Inbox inbox = getInbox(alice);
cleanUp(inbox, SUBJECT);
assertFalse(containsMessage(inbox, SUBJECT));
session.commit();
Thread.sleep(100);
assertTrue(containsMessage(inbox, SUBJECT));
cleanUp(inbox, SUBJECT);