@Test
public void pushPromiseWriteShouldReserveStream() throws Exception {

    createStream(STREAM_ID, false);
    ChannelPromise promise = newPromise();
    encoder.writePushPromise(ctx, STREAM_ID, PUSH_STREAM_ID, EmptyHttp2Headers.INSTANCE, 0, promise);
    assertEquals(RESERVED_LOCAL, stream(PUSH_STREAM_ID).state());
    verify(writer).writePushPromise(eq(ctx), eq(STREAM_ID), eq(PUSH_STREAM_ID),
            eq(EmptyHttp2Headers.INSTANCE), eq(0), eq(promise));
}