DefaultHttp2Connection implements Http2Connection { @Override public Endpoint<Http2RemoteFlowController> remote() { return remoteEndpoint; } DefaultHttp2Connection(boolean server); @Override void addListener(Listener listener); @Override void removeListener(Listener listener); @Override boolean isServer(); @Override Http2Stream connectionStream(); @Override Http2Stream stream(int streamId); @Override boolean streamMayHaveExisted(int streamId); @Override int numActiveStreams(); @Override Http2Stream forEachActiveStream(Http2StreamVisitor visitor); @Override Endpoint<Http2LocalFlowController> local(); @Override Endpoint<Http2RemoteFlowController> remote(); @Override boolean goAwayReceived(); @Override void goAwayReceived(final int lastKnownStream, long errorCode, ByteBuf debugData); @Override boolean goAwaySent(); @Override void goAwaySent(final int lastKnownStream, long errorCode, ByteBuf debugData); @Override PropertyKey newKey();  }
@SuppressWarnings("NumericOverflow") @Test(expected = Http2Exception.class) public void remoteStreamInvalidStreamIdShouldThrow() throws Http2Exception { client.remote().createStream(Integer.MAX_VALUE + 1, false); }