Class FakeAzureHttpResponse

java.lang.Object
com.azure.core.http.HttpResponse
org.apache.polaris.service.exception.FakeAzureHttpResponse
All Implemented Interfaces:
Closeable, AutoCloseable

public class FakeAzureHttpResponse extends com.azure.core.http.HttpResponse
Fake version of an Azure HttpResponse that can be forced to return a fixed statusCode.
  • Constructor Details

    • FakeAzureHttpResponse

      public FakeAzureHttpResponse(int mockStatusCode)
  • Method Details

    • getStatusCode

      public int getStatusCode()
      Specified by:
      getStatusCode in class com.azure.core.http.HttpResponse
    • getHeaderValue

      @Deprecated public String getHeaderValue(String name)
      Deprecated.
      Specified by:
      getHeaderValue in class com.azure.core.http.HttpResponse
    • getHeaders

      public com.azure.core.http.HttpHeaders getHeaders()
      Specified by:
      getHeaders in class com.azure.core.http.HttpResponse
    • getBody

      public reactor.core.publisher.Flux<ByteBuffer> getBody()
      Specified by:
      getBody in class com.azure.core.http.HttpResponse
    • getBodyAsByteArray

      public reactor.core.publisher.Mono<byte[]> getBodyAsByteArray()
      Specified by:
      getBodyAsByteArray in class com.azure.core.http.HttpResponse
    • getBodyAsString

      public reactor.core.publisher.Mono<String> getBodyAsString()
      Specified by:
      getBodyAsString in class com.azure.core.http.HttpResponse
    • getBodyAsString

      public reactor.core.publisher.Mono<String> getBodyAsString(Charset charset)
      Specified by:
      getBodyAsString in class com.azure.core.http.HttpResponse