@Test
public void testDynamoDBThrottleConversion() throws Throwable {

  ProvisionedThroughputExceededException exceededException =
      new ProvisionedThroughputExceededException("iops");
  AWSServiceThrottledException ddb = verifyTranslated(
      AWSServiceThrottledException.class, exceededException);
  assertTrue(isThrottleException(exceededException));
  assertTrue(isThrottleException(ddb));
  assertRetryAction("Expected throttling retry",
      RETRY_POLICY,
      RetryPolicy.RetryAction.RETRY,
      ddb, SAFE_RETRY_COUNT, false);
  // and briefly attempt an operation
  CatchCallback catcher = new CatchCallback();
  AtomicBoolean invoked = new AtomicBoolean(false);
  invoker.retry("test", null, false, catcher,
      () -> {
        if (!invoked.getAndSet(true)) {
          throw exceededException;
        }
      });
  // to verify that the ex was translated by the time it
  // got to the callback
  verifyExceptionClass(AWSServiceThrottledException.class,
      catcher.lastException);
}