Add a helper class for testing request cancellation.