@Override
  public Mono<GetTurnCredentialsResponse> getTurnCredentials(final GetTurnCredentialsRequest request) {
    final AuthenticatedDevice authenticatedDevice = AuthenticationUtil.requireAuthenticatedDevice();

    return rateLimiters.getTurnLimiter().validateReactive(authenticatedDevice.accountIdentifier())
        .then(Mono.fromSupplier(() -> turnTokenGenerator.generate(authenticatedDevice.accountIdentifier())))
        .map(turnToken -> GetTurnCredentialsResponse.newBuilder()
            .setUsername(turnToken.username())
            .setPassword(turnToken.password())
            .addAllUrls(turnToken.urls())
            .build());
  }
@Test
  void getTurnCredentialsRateLimited() {
    final Duration retryAfter = MockUtils.updateRateLimiterResponseToFail(
        turnCredentialRateLimiter, AUTHENTICATED_ACI, Duration.ofMinutes(19), false);
    assertRateLimitExceeded(retryAfter, () -> authenticatedServiceStub().getTurnCredentials(GetTurnCredentialsRequest.newBuilder().build()));
    verify(turnTokenGenerator, never()).generate(any());
    verifyNoInteractions(turnTokenGenerator);
  }