### Question:
JcrObservationManager implements ObservationManager { String getUserId() { return this.session.getUserID(); } JcrObservationManager( JcrSession session,
                           Observable repositoryObservable ); synchronized void addEventListener( EventListener listener,
                                               int eventTypes,
                                               String absPath,
                                               boolean isDeep,
                                               String[] uuid,
                                               String[] nodeTypeName,
                                               boolean noLocal ); EventListenerIterator getRegisteredEventListeners(); synchronized void removeEventListener( EventListener listener ); @Override void setUserData( String userData ); @Override EventJournal getEventJournal(); @Override EventJournal getEventJournal( int eventTypes,
                                         String absPath,
                                         boolean isDeep,
                                         String[] uuid,
                                         String[] nodeTypeName );  }### Answer:
@Test public void shouldTestEventTest_testGetUserId() throws Exception { TestListener listener = addListener(1, Event.NODE_ADDED, null, false, null, null, false); getRoot().addNode("node1", UNSTRUCTURED); save(); listener.waitForEvents(); removeListener(listener); checkResults(listener); assertThat("UserId of event is not equal to userId of session", listener.getEvents().get(0).getUserID(), is(USER_ID)); }