@Test
public void closeShouldCancelAllBufferedStreams() throws Http2Exception {

    encoder.writeSettingsAck(ctx, newPromise());
    connection.local().maxActiveStreams(0);
    ChannelFuture f1 = encoderWriteHeaders(3, newPromise());
    ChannelFuture f2 = encoderWriteHeaders(5, newPromise());
    ChannelFuture f3 = encoderWriteHeaders(7, newPromise());
    encoder.close();
    assertNotNull(f1.cause());
    assertNotNull(f2.cause());
    assertNotNull(f3.cause());
}