public CompletableFuture<Void> deleteBackups(final UUID accountUuid) {

    final ExternalServiceCredentials credentials = secureValueRecoveryCredentialsGenerator.generateForUuid(accountUuid);

    final HttpRequest request = HttpRequest.newBuilder()
        .uri(deleteUri)
        .DELETE()
        .header(HttpHeaders.AUTHORIZATION, basicAuthHeader(credentials))
        .build();

    return httpClient.sendAsync(request, HttpResponse.BodyHandlers.ofString()).thenApply(response -> {
      if (HttpUtils.isSuccessfulResponse(response.statusCode())) {
        return null;
      }

      throw new SecureValueRecoveryException("Failed to delete backup: " + response.statusCode());
    });
  }
@Test
  void deleteStoredDataFailure() {
    final String username = RandomStringUtils.randomAlphabetic(16);
    final String password = RandomStringUtils.randomAlphanumeric(32);

    when(credentialsGenerator.generateForUuid(accountUuid)).thenReturn(
        new ExternalServiceCredentials(username, password));

    wireMock.stubFor(delete(urlEqualTo(SecureValueRecovery2Client.DELETE_PATH))
        .withBasicAuth(username, password)
        .willReturn(aResponse().withStatus(400)));

    final CompletionException completionException = assertThrows(CompletionException.class,
        () -> secureValueRecovery2Client.deleteBackups(accountUuid).join());
    assertTrue(completionException.getCause() instanceof SecureValueRecoveryException);
  }