try {
URL.setURLStreamHandlerFactory(new ArtifactURLStreamHandlerFactory());
} catch(Error e) {
System.out.println("Factory already defined, move along");
}
EventCollector eventCollector = (EventCollector)testManager.waitForService(EventCollector.class);
Assert.assertNotNull(eventCollector);
EventCollectorRegistration registration1 = eventCollector.register(Lease.ANY);
EventCollectorRegistration registration2 = eventCollector.register(Lease.ANY);
BasicEventListener listener1 = new BasicEventListener();
RemoteEventListener eventListener = listener1.export();
registration1.enableDelivery(eventListener);