use of software.amazon.awssdk.services.dynamodb.model.TransactWriteItemsResponse in project aws-sdk-java-v2 by aws.
the class TransactWriteItemsOperationTest method transformResponse_doesNothing.
@Test
public void transformResponse_doesNothing() {
TransactWriteItemsOperation operation = TransactWriteItemsOperation.create(emptyRequest());
TransactWriteItemsResponse response = TransactWriteItemsResponse.builder().build();
operation.transformResponse(response, mockDynamoDbEnhancedClientExtension);
verifyNoMoreInteractions(mockDynamoDbEnhancedClientExtension);
}
use of software.amazon.awssdk.services.dynamodb.model.TransactWriteItemsResponse in project aws-sdk-java-v2 by aws.
the class TransactWriteItemsOperationTest method getServiceCall_callsServiceAndReturnsResult.
@Test
public void getServiceCall_callsServiceAndReturnsResult() {
TransactWriteItemsOperation operation = TransactWriteItemsOperation.create(emptyRequest());
TransactWriteItemsRequest request = TransactWriteItemsRequest.builder().transactItems(singletonList(fakeTransactWriteItem1)).build();
TransactWriteItemsResponse expectedResponse = TransactWriteItemsResponse.builder().build();
when(mockDynamoDbClient.transactWriteItems(any(TransactWriteItemsRequest.class))).thenReturn(expectedResponse);
TransactWriteItemsResponse actualResponse = operation.serviceCall(mockDynamoDbClient).apply(request);
assertThat(actualResponse, is(sameInstance(expectedResponse)));
verify(mockDynamoDbClient).transactWriteItems(request);
verifyNoMoreInteractions(mockDynamoDbEnhancedClientExtension);
}
Aggregations