@Test
public void priorityWriteAfterGoAwayShouldSucceed() throws Exception {

    createStream(STREAM_ID, false);
    goAwayReceived(Integer.MAX_VALUE);
    ChannelPromise promise = newPromise();
    encoder.writePriority(ctx, STREAM_ID, 0, (short) 255, true, promise);
    verify(writer).writePriority(eq(ctx), eq(STREAM_ID), eq(0), eq((short) 255), eq(true), eq(promise));
}