private void invokeHandshakeCompleted(Work work, MockSslSocket socket) throws Exception
{
Method handshakeCompleted = work.getClass().getDeclaredMethod("handshakeCompleted", HandshakeCompletedEvent.class);
assertNotNull(handshakeCompleted);
handshakeCompleted.setAccessible(true);
HandshakeCompletedEvent event = new MockHandshakeCompletedEvent(socket);
handshakeCompleted.invoke(work, new Object[] { event });
}