### Question:
HTTPPluginThreadState extends SkeletonThreadLifeCycleListener implements PluginThreadListener { HTTPPluginThreadState(final PluginThreadContext threadContext, final SSLContextFactory sslContextFactory, final Sleeper slowClientSleeper, final TimeAuthority timeAuthority) throws PluginException { m_threadContext = threadContext; m_sslContextFactory = sslContextFactory; m_slowClientSleeper = slowClientSleeper; m_timeAuthority = new TimeAuthorityAdapter(timeAuthority); } HTTPPluginThreadState(final PluginThreadContext threadContext,
                        final SSLContextFactory sslContextFactory,
                        final Sleeper slowClientSleeper,
                        final TimeAuthority timeAuthority); PluginThreadContext getThreadContext(); HTTPConnectionWrapper getConnectionWrapper(final URI uri); @Override void beginRun(); void setLastResponse(final HTTPResponse lastResponse); HTTPResponse getLastResponse();  }### Answer:
@Test public void testHTTPPluginThreadState() throws Exception { final HTTPPluginThreadState pluginThreadState = new HTTPPluginThreadState(m_threadContext, m_sslContextFactory, m_sleeper, null); assertSame(m_threadContext, pluginThreadState.getThreadContext()); pluginThreadState.beginThread(); pluginThreadState.beginRun(); pluginThreadState.endRun(); pluginThreadState.beginRun(); final HTTPConnectionWrapper wrapper1 = pluginThreadState.getConnectionWrapper(new URI("http: assertNotNull(wrapper1); assertNotNull(m_sslContextFactory.getSSLContext().getSocketFactory()); final HTTPConnectionWrapper wrapper2 = pluginThreadState.getConnectionWrapper(new URI("https: assertNotNull(wrapper2); final HTTPConnectionWrapper wrapper3 = pluginThreadState.getConnectionWrapper(new URI("http: assertSame(wrapper1, wrapper3); assertNotSame(wrapper2, wrapper3); pluginThreadState.endRun(); pluginThreadState.beginRun(); final HTTPConnectionWrapper wrapper4 = pluginThreadState.getConnectionWrapper(new URI("http: assertNotSame(wrapper1, wrapper4); pluginThreadState.endRun(); pluginThreadState.endThread(); pluginThreadState.beginShutdown(); }