/**
   * Test Right Throw one event into one queue and assert the event is inserted only in one queue
   * the test assert too that no other event appears into the queue
   *
   * @throws Exception
   */
  @Test(timeout = 30000)
  public void testNotificationSimple() throws Exception {
    logger.info("testNotificationSimple() called");
    String caller = membership.getProfilePathForConnectedIdentifier();

    greeting.sayHello(pathResource);
    Event[] lEvent1 = new Event[] {};
    // wait that an event appears into the queue
    while (lEvent1.length == 0) {
      lEvent1 = eqs.getEvents(pathQueue1);
    }
    assertTrue(lEvent1.length == 1);
    Event e = lEvent1[0];
    assertEquals(
        "TestNotification1 : event resource expected /name but found " + e.getFromResource(),
        e.getFromResource(),
        pathResource);
    assertEquals(
        "TestNotification1 : event type expected greeting.name.create but found "
            + e.getEventType(),
        e.getEventType(),
        "greeting.name.say-hello");
    assertEquals(
        "TestNotification1 : event throwedBy expected " + caller + " but found" + e.getThrowedBy(),
        e.getThrowedBy(),
        caller);

    Event[] lEvent2 = eqs.getEvents(pathQueue2);
    assertTrue(
        "TestNotification1 : expected 0 event into queue2("
            + pathQueue2
            + ") but found "
            + lEvent2.length,
        lEvent2.length == 0);

    Thread.sleep(10);
    // assert that no other events happen
    lEvent1 = eqs.getEvents(pathQueue1);
    assertTrue(
        "TestNotification1 : expected 0 event into queue1("
            + pathQueue1
            + ") but found "
            + lEvent1.length,
        lEvent1.length == 1);
  }