DefaultHttp2FrameStream newStream() {
        return new DefaultHttp2FrameStream();
    }
@Test
    public void streamIdentifiersExhausted() throws Http2Exception {
        int maxServerStreamId = Integer.MAX_VALUE - 1;

        assertNotNull(frameCodec.connection().local().createStream(maxServerStreamId, false));

        Http2FrameStream stream = frameCodec.newStream();
        assertNotNull(stream);

        ChannelPromise writePromise = channel.newPromise();
        channel.writeAndFlush(new DefaultHttp2HeadersFrame(new DefaultHttp2Headers()).stream(stream), writePromise);

        Http2GoAwayFrame goAwayFrame = inboundHandler.readInbound();
        assertNotNull(goAwayFrame);
        assertEquals(NO_ERROR.code(), goAwayFrame.errorCode());
        assertEquals(Integer.MAX_VALUE, goAwayFrame.lastStreamId());
        goAwayFrame.release();
        assertThat(writePromise.cause(), instanceOf(Http2NoMoreStreamIdsException.class));
    }