### Question:
AWSServiceHandlerManifest { public AWSOperationHandlerManifest getOperationHandlerManifest(String serviceName) { return services.get(serviceName); }  AWSOperationHandlerManifest getOperationHandlerManifest(String serviceName);  }### Answer:
@Test public void testOperationRequestDescriptors() throws Exception { AWSServiceHandlerManifest serviceManifest = mapper.readValue(testParameterWhitelist, AWSServiceHandlerManifest.class); AWSOperationHandlerManifest operationManifest = serviceManifest.getOperationHandlerManifest("DynamoDb"); AWSOperationHandler operationHandler = operationManifest.getOperationHandler("BatchGetItem"); AWSOperationHandlerRequestDescriptor descriptor = operationHandler.getRequestDescriptors().get("RequestItems"); Assert.assertEquals(true, descriptor.isMap()); Assert.assertEquals(false, descriptor.isList()); Assert.assertEquals(true, descriptor.shouldGetKeys()); Assert.assertEquals(false, descriptor.shouldGetCount()); Assert.assertEquals("table_names", descriptor.getRenameTo()); }
@Test public void testOperationRequestParameters() throws Exception { AWSServiceHandlerManifest serviceManifest = mapper.readValue(testParameterWhitelist, AWSServiceHandlerManifest.class); AWSOperationHandlerManifest operationManifest = serviceManifest.getOperationHandlerManifest("DynamoDb"); AWSOperationHandler operationHandler = operationManifest.getOperationHandler("CreateTable"); HashSet<String> parameters = operationHandler.getRequestParameters(); Assert.assertEquals(true, parameters.contains("GlobalSecondaryIndexes")); Assert.assertEquals(true, parameters.contains("LocalSecondaryIndexes")); Assert.assertEquals(true, parameters.contains("ProvisionedThroughput")); Assert.assertEquals(true, parameters.contains("TableName")); }
@Test public void testOperationResponseDescriptors() throws Exception { AWSServiceHandlerManifest serviceManifest = mapper.readValue(testParameterWhitelist, AWSServiceHandlerManifest.class); AWSOperationHandlerManifest operationManifest = serviceManifest.getOperationHandlerManifest("DynamoDb"); AWSOperationHandler operationHandler = operationManifest.getOperationHandler("ListTables"); AWSOperationHandlerResponseDescriptor descriptor = operationHandler.getResponseDescriptors().get("TableNames"); Assert.assertEquals(false, descriptor.isMap()); Assert.assertEquals(true, descriptor.isList()); Assert.assertEquals(false, descriptor.shouldGetKeys()); Assert.assertEquals(true, descriptor.shouldGetCount()); Assert.assertEquals("table_count", descriptor.getRenameTo()); }
@Test public void testOperationResponseParameters() throws Exception { AWSServiceHandlerManifest serviceManifest = mapper.readValue(testParameterWhitelist, AWSServiceHandlerManifest.class); AWSOperationHandlerManifest operationManifest = serviceManifest.getOperationHandlerManifest("DynamoDb"); AWSOperationHandler operationHandler = operationManifest.getOperationHandler("DeleteItem"); HashSet<String> parameters = operationHandler.getResponseParameters(); Assert.assertEquals(true, parameters.contains("ConsumedCapacity")); Assert.assertEquals(true, parameters.contains("ItemCollectionMetrics")); }