final HttpRoute route = new HttpRoute(target);
final HttpContext context = new BasicHttpContext();
final Log log = Mockito.mock(Log.class);
final CPoolEntry poolentry = new CPoolEntry(log, "some-id", route, conn, -1, TimeUnit.MILLISECONDS);
final NHttpClientConnection managedConn = CPoolProxy.newProxy(poolentry);
Mockito.when(conn.getIOSession()).thenReturn(iosession);
Mockito.when(sslStrategy.upgrade(target, iosession)).thenReturn(iosession);
connman.startRoute(managedConn, route, context);