diff --git a/sdk/core/azure-core-test/src/main/java/com/azure/core/test/http/TestProxyPlaybackClient.java b/sdk/core/azure-core-test/src/main/java/com/azure/core/test/http/TestProxyPlaybackClient.java index 5777b3a330c2..fb04b899b5f9 100644 --- a/sdk/core/azure-core-test/src/main/java/com/azure/core/test/http/TestProxyPlaybackClient.java +++ b/sdk/core/azure-core-test/src/main/java/com/azure/core/test/http/TestProxyPlaybackClient.java @@ -284,4 +284,18 @@ private boolean isPlayingBack() { public String getRecordingFileLocation() { return xRecordingFileLocation; } + + /** + * Redirects the provided {@link HttpRequest} to the test proxy to retrieve the playback response. + * This method is invoked during playback mode to simulate the expected response for a request. + * + * @param request The {@link HttpRequest} to be sent. + * @param context The {@link Context} associated with the operation. + * @return A {@link Mono} of {@link HttpResponse} containing the playback response. + */ + @Override + public Mono send(HttpRequest request, Context context) { + beforeSendingRequest(request); + return client.send(request, context).map(this::afterReceivedResponse); + } }