### Question:
FlowControlCounter { public void resetStream(final long sid, final long finalOffset) { final StreamCounter stream = streams.computeIfAbsent(sid, ignored -> new StreamCounter()); stream.offset.updateAndGet(current -> max(current, finalOffset)); stream.finished = true; } FlowControlCounter(final long connectionMaxBytes, final long streamMaxBytes); synchronized TryConsumeResult tryConsume(final long sid, final long offset); void resetStream(final long sid, final long finalOffset); void setConnectionMaxBytes(final long connectionMaxBytes); long increaseStreamMax(final long sid); long increaseConnectionMax(); void setStreamMaxBytes(final long sid, final long streamMaxBytes);  }### Answer:
@Test public void resetStream() { assertConsume(fcm.tryConsume(sid, 2), true, 2, maxConn, 2, maxStream); fcm.resetStream(sid, 5); assertConsume(fcm.tryConsume(sid2, 1), true, 6, maxConn, 1, maxStream); }