### Question:
DynamoDBService { public <T>List<T> queryDynamoDB(DynamoDBQueryExpression queryRequest, Class<T> clazz, DynamoDBMapper dynamoDBMapper){ List<T> queryResults = null; logger.info("Querying DynamoDB table..."); long startTime = System.currentTimeMillis(); try { queryResults = dynamoDBMapper.query(clazz, queryRequest); } catch (ProvisionedThroughputExceededException pte) { logger.error("Provisioned Throughput Exceeded. ", pte); } catch (ResourceNotFoundException rnf) { String message = "Credential table not found!"; logger.error(message, rnf); throw new FideliusException(message, HttpStatus.NOT_FOUND); } if (queryResults == null) { logger.error("Throttling rate exceeded!"); throw new FideliusException("Throttling rate exceeded!", HttpStatus.REQUEST_TIMEOUT); } else { logger.info(String.format("Query completed in %.3f seconds", (System.currentTimeMillis() - startTime) / 1000.0)); } return queryResults; }  List<T> scanDynamoDB(DynamoDBScanExpression scanExp, Class<T> clazz, DynamoDBMapper mapper); List<T> queryDynamoDB(DynamoDBQueryExpression queryRequest, Class<T> clazz, DynamoDBMapper dynamoDBMapper); DynamoDBMapper createMapper(String account, String region, String tableName);  }### Answer:
@Test(expected = FideliusException.class) public void queryDynamoDBFailsAfterIntervalReaches60SecondsWhenRetryingOnThrottlingException() { when(fakeMapper.query(any(), any())).thenThrow(new ProvisionedThroughputExceededException("test")); dynamoDBService.queryDynamoDB(new DynamoDBQueryExpression(), Object.class, fakeMapper); }