We use the pattern of
CapturingTransport.CapturedRequest[] capturedRequests = transport.capturedRequests();
transport.clear()
where transport is a CapturingTransport throughout our test suite. This pattern could be simplified by adding a dedicated CapturingTransport#captureRequestsAndClear method.