### Question:
DefaultHttp2Connection implements Http2Connection { @Override public Endpoint<Http2RemoteFlowController> remote() { return remoteEndpoint; } DefaultHttp2Connection(final boolean server);  DefaultHttp2Connection(final boolean server, final int maxReservedStreams); @Override Future<Void> close(final Promise<Void> promise); @Override void addListener(final Listener listener); @Override void removeListener(final Listener listener); @Override boolean isServer(); @Override Http2Stream connectionStream(); @Override Http2Stream stream(final int streamId); @Override boolean streamMayHaveExisted(final int streamId); @Override int numActiveStreams(); @Override Http2Stream forEachActiveStream(final Http2StreamVisitor visitor); @Override Endpoint<Http2LocalFlowController> local(); @Override Endpoint<Http2RemoteFlowController> remote(); @Override boolean goAwayReceived(); @Override void goAwayReceived(
      final int lastKnownStream, final long errorCode, final ByteBuf debugData); @Override boolean goAwaySent(); @Override boolean goAwaySent(
      final int lastKnownStream, final long errorCode, final ByteBuf debugData); @Override PropertyKey newKey();  }### Answer:
@Test public void removeAllStreamsWithJustOneRemoveStream() throws InterruptedException, Http2Exception { client.remote().createStream(2, false); testRemoveAllStreams(); }
@Test public void serverRemoteIncrementAndGetStreamShouldSucceed() throws Http2Exception { incrementAndGetStreamShouldSucceed(server.remote()); }
@Test public void clientRemoteIncrementAndGetStreamShouldSucceed() throws Http2Exception { incrementAndGetStreamShouldSucceed(client.remote()); }
@Test(expected = Http2NoMoreStreamIdsException.class) public void serverRemoteIncrementAndGetStreamShouldRespectOverflow() throws Http2Exception { incrementAndGetStreamShouldRespectOverflow(server.remote(), MAX_VALUE); }
@Test(expected = Http2NoMoreStreamIdsException.class) public void clientRemoteIncrementAndGetStreamShouldRespectOverflow() throws Http2Exception { incrementAndGetStreamShouldRespectOverflow(client.remote(), MAX_VALUE - 1); }
@Test(expected = Http2Exception.class) public void serverCreatePushShouldFailOnRemoteEndpointWhenMaxAllowedStreamsExceeded() throws Http2Exception { server = new DefaultHttp2Connection(true, 0); server.remote().maxActiveStreams(1); final Http2Stream requestStream = server.remote().createStream(3, false); server.remote().reservePushStream(2, requestStream); }
@Test(expected = Http2Exception.class) public void clientCreatePushShouldFailOnRemoteEndpointWhenMaxAllowedStreamsExceeded() throws Http2Exception { client = new DefaultHttp2Connection(false, 0); client.remote().maxActiveStreams(1); final Http2Stream requestStream = client.remote().createStream(2, false); client.remote().reservePushStream(4, requestStream); }
@SuppressWarnings("NumericOverflow") @Test(expected = Http2Exception.class) public void remoteStreamInvalidStreamIdShouldThrow() throws Http2Exception { client.remote().createStream(MAX_VALUE + 1, false); }