@org.junit.Test public void testSetup() throws RepositoryException {
assertEquals(this.handler.applicationId, SLING_ID);
assertEquals(this.handler.repositoryPath, REPO_PATH);
assertNotNull(this.handler.writerSession);
final EventListenerIterator iter = this.handler.writerSession.getWorkspace().getObservationManager().getRegisteredEventListeners();
boolean found = false;
while ( !found && iter.hasNext() ) {
final javax.jcr.observation.EventListener listener = iter.nextEventListener();
found = (listener == this.handler);
}
assertTrue("Handler is not registered as event listener.", found);
}