@Test
public void canWriteHeaderFrameAfterGoAwaySent() throws Exception {

    writeAllFlowControlledFrames();
    createStream(STREAM_ID, false);
    goAwaySent(0);
    ChannelPromise promise = newPromise();
    encoder.writeHeaders(ctx, STREAM_ID, EmptyHttp2Headers.INSTANCE, 0, false, promise);
    verify(writer).writeHeaders(eq(ctx), eq(STREAM_ID), eq(EmptyHttp2Headers.INSTANCE), eq(0),
            eq(DEFAULT_PRIORITY_WEIGHT), eq(false), eq(0), eq(false), eq(promise));
}