Assert.assertTrue(socketEvents.size() > 0);
ISocketEvent socketEvent = (ISocketEvent) socketEvents.remove(0);
Assert.assertTrue(socketEvent.toString(),
socketEvent instanceof ISocketCreatedEvent);
ISocketCreatedEvent createdEvent = (ISocketCreatedEvent) socketEvent;
ISocketEventSource source = createdEvent.getSource();
Assert.assertNotNull(source.toString(), source);
Object primary = canAdaptTo(source);
Socket createdSocket = createdEvent.getSocket();
Assert.assertNotNull(primary.toString(), createdSocket);
Assert.assertTrue(socketEvents.size() > 0);