@Test
public void testHttpsHandshakeCompletesBeforeProcessingMessage() throws Exception
{
MockHttpsMessageReceiver messageReceiver = setupMockHttpsMessageReceiver();
MockSslSocket socket = new MockSslSocket();
socket.setInputStream(new ByteArrayInputStream("GET /path/to/file/index.html HTTP/1.0\n\n\n".getBytes()));
HttpServerConnection serverConnection = new HttpServerConnection(socket, "utf-8", (HttpConnector) messageReceiver.getConnector());
HttpMessageProcessTemplate messageContext = messageReceiver.createMessageProcessTemplate(serverConnection);
invokeHandshakeCompleted(serverConnection, socket);