@Test
public void testProduceOutputClosingConnection() throws Exception {
final BasicHttpResponse response = new BasicHttpResponse(HttpVersion.HTTP_1_1, 200, "OK");
final WritableByteChannelMock wchannel = Mockito.spy(new WritableByteChannelMock(64));
final ByteChannelMock channel = new ByteChannelMock(null, wchannel);
Mockito.when(session.channel()).thenReturn(channel);
conn.submitResponse(response);
conn.close();