Search in sources :

Example 1 with TransactWriteItemsEnhancedRequest

use of software.amazon.awssdk.enhanced.dynamodb.model.TransactWriteItemsEnhancedRequest in project aws-sdk-java-v2 by aws.

the class AsyncTransactWriteItemsTest method mixedCommands.

@Test
public void mixedCommands() {
    mappedTable1.putItem(r -> r.item(RECORDS_1.get(0))).join();
    mappedTable2.putItem(r -> r.item(RECORDS_2.get(0))).join();
    Expression conditionExpression = Expression.builder().expression("#attribute = :attribute").expressionValues(singletonMap(":attribute", stringValue("0"))).expressionNames(singletonMap("#attribute", "attribute")).build();
    Key key = Key.builder().partitionValue(0).build();
    TransactWriteItemsEnhancedRequest transactWriteItemsEnhancedRequest = TransactWriteItemsEnhancedRequest.builder().addConditionCheck(mappedTable1, ConditionCheck.builder().key(key).conditionExpression(conditionExpression).build()).addPutItem(mappedTable2, RECORDS_2.get(1)).addUpdateItem(mappedTable1, RECORDS_1.get(1)).addDeleteItem(mappedTable2, RECORDS_2.get(0)).build();
    enhancedAsyncClient.transactWriteItems(transactWriteItemsEnhancedRequest).join();
    assertThat(mappedTable1.getItem(r -> r.key(k -> k.partitionValue(1))).join(), is(RECORDS_1.get(1)));
    assertThat(mappedTable2.getItem(r -> r.key(k -> k.partitionValue(0))).join(), is(nullValue()));
    assertThat(mappedTable2.getItem(r -> r.key(k -> k.partitionValue(1))).join(), is(RECORDS_2.get(1)));
}
Also used : IntStream(java.util.stream.IntStream) DynamoDbEnhancedAsyncClient(software.amazon.awssdk.enhanced.dynamodb.DynamoDbEnhancedAsyncClient) Expression(software.amazon.awssdk.enhanced.dynamodb.Expression) TransactWriteItemsEnhancedRequest(software.amazon.awssdk.enhanced.dynamodb.model.TransactWriteItemsEnhancedRequest) Matchers.nullValue(org.hamcrest.Matchers.nullValue) After(org.junit.After) Collections.singletonMap(java.util.Collections.singletonMap) Assert.fail(org.junit.Assert.fail) DynamoDbAsyncTable(software.amazon.awssdk.enhanced.dynamodb.DynamoDbAsyncTable) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) DefaultDynamoDbEnhancedAsyncClient(software.amazon.awssdk.enhanced.dynamodb.internal.client.DefaultDynamoDbEnhancedAsyncClient) DeleteTableRequest(software.amazon.awssdk.services.dynamodb.model.DeleteTableRequest) Before(org.junit.Before) TransactionCanceledException(software.amazon.awssdk.services.dynamodb.model.TransactionCanceledException) Key(software.amazon.awssdk.enhanced.dynamodb.Key) TableSchema(software.amazon.awssdk.enhanced.dynamodb.TableSchema) CompletionException(java.util.concurrent.CompletionException) Test(org.junit.Test) Collectors(java.util.stream.Collectors) Matchers.instanceOf(org.hamcrest.Matchers.instanceOf) Objects(java.util.Objects) StaticAttributeTags.primaryPartitionKey(software.amazon.awssdk.enhanced.dynamodb.mapper.StaticAttributeTags.primaryPartitionKey) List(java.util.List) ConditionCheck(software.amazon.awssdk.enhanced.dynamodb.model.ConditionCheck) Matchers.is(org.hamcrest.Matchers.is) StaticTableSchema(software.amazon.awssdk.enhanced.dynamodb.mapper.StaticTableSchema) AttributeValues.stringValue(software.amazon.awssdk.enhanced.dynamodb.internal.AttributeValues.stringValue) Expression(software.amazon.awssdk.enhanced.dynamodb.Expression) Key(software.amazon.awssdk.enhanced.dynamodb.Key) StaticAttributeTags.primaryPartitionKey(software.amazon.awssdk.enhanced.dynamodb.mapper.StaticAttributeTags.primaryPartitionKey) TransactWriteItemsEnhancedRequest(software.amazon.awssdk.enhanced.dynamodb.model.TransactWriteItemsEnhancedRequest) Test(org.junit.Test)

Example 2 with TransactWriteItemsEnhancedRequest

use of software.amazon.awssdk.enhanced.dynamodb.model.TransactWriteItemsEnhancedRequest in project aws-sdk-java-v2 by aws.

the class AsyncTransactWriteItemsTest method mixedCommands_conditionCheckFailsTransaction.

@Test
public void mixedCommands_conditionCheckFailsTransaction() {
    mappedTable1.putItem(r -> r.item(RECORDS_1.get(0))).join();
    mappedTable2.putItem(r -> r.item(RECORDS_2.get(0))).join();
    Expression conditionExpression = Expression.builder().expression("#attribute = :attribute").expressionValues(singletonMap(":attribute", stringValue("1"))).expressionNames(singletonMap("#attribute", "attribute")).build();
    Key key = Key.builder().partitionValue(0).build();
    TransactWriteItemsEnhancedRequest transactWriteItemsEnhancedRequest = TransactWriteItemsEnhancedRequest.builder().addPutItem(mappedTable2, RECORDS_2.get(1)).addUpdateItem(mappedTable1, RECORDS_1.get(1)).addConditionCheck(mappedTable1, ConditionCheck.builder().key(key).conditionExpression(conditionExpression).build()).addDeleteItem(mappedTable2, RECORDS_2.get(0)).build();
    try {
        enhancedAsyncClient.transactWriteItems(transactWriteItemsEnhancedRequest).join();
        fail("Expected CompletionException to be thrown");
    } catch (CompletionException e) {
        assertThat(e.getCause(), instanceOf(TransactionCanceledException.class));
    }
    assertThat(mappedTable1.getItem(r -> r.key(k -> k.partitionValue(1))).join(), is(nullValue()));
    assertThat(mappedTable2.getItem(r -> r.key(k -> k.partitionValue(0))).join(), is(RECORDS_2.get(0)));
    assertThat(mappedTable2.getItem(r -> r.key(k -> k.partitionValue(1))).join(), is(nullValue()));
}
Also used : IntStream(java.util.stream.IntStream) DynamoDbEnhancedAsyncClient(software.amazon.awssdk.enhanced.dynamodb.DynamoDbEnhancedAsyncClient) Expression(software.amazon.awssdk.enhanced.dynamodb.Expression) TransactWriteItemsEnhancedRequest(software.amazon.awssdk.enhanced.dynamodb.model.TransactWriteItemsEnhancedRequest) Matchers.nullValue(org.hamcrest.Matchers.nullValue) After(org.junit.After) Collections.singletonMap(java.util.Collections.singletonMap) Assert.fail(org.junit.Assert.fail) DynamoDbAsyncTable(software.amazon.awssdk.enhanced.dynamodb.DynamoDbAsyncTable) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) DefaultDynamoDbEnhancedAsyncClient(software.amazon.awssdk.enhanced.dynamodb.internal.client.DefaultDynamoDbEnhancedAsyncClient) DeleteTableRequest(software.amazon.awssdk.services.dynamodb.model.DeleteTableRequest) Before(org.junit.Before) TransactionCanceledException(software.amazon.awssdk.services.dynamodb.model.TransactionCanceledException) Key(software.amazon.awssdk.enhanced.dynamodb.Key) TableSchema(software.amazon.awssdk.enhanced.dynamodb.TableSchema) CompletionException(java.util.concurrent.CompletionException) Test(org.junit.Test) Collectors(java.util.stream.Collectors) Matchers.instanceOf(org.hamcrest.Matchers.instanceOf) Objects(java.util.Objects) StaticAttributeTags.primaryPartitionKey(software.amazon.awssdk.enhanced.dynamodb.mapper.StaticAttributeTags.primaryPartitionKey) List(java.util.List) ConditionCheck(software.amazon.awssdk.enhanced.dynamodb.model.ConditionCheck) Matchers.is(org.hamcrest.Matchers.is) StaticTableSchema(software.amazon.awssdk.enhanced.dynamodb.mapper.StaticTableSchema) AttributeValues.stringValue(software.amazon.awssdk.enhanced.dynamodb.internal.AttributeValues.stringValue) Expression(software.amazon.awssdk.enhanced.dynamodb.Expression) CompletionException(java.util.concurrent.CompletionException) Key(software.amazon.awssdk.enhanced.dynamodb.Key) StaticAttributeTags.primaryPartitionKey(software.amazon.awssdk.enhanced.dynamodb.mapper.StaticAttributeTags.primaryPartitionKey) TransactWriteItemsEnhancedRequest(software.amazon.awssdk.enhanced.dynamodb.model.TransactWriteItemsEnhancedRequest) Test(org.junit.Test)

Example 3 with TransactWriteItemsEnhancedRequest

use of software.amazon.awssdk.enhanced.dynamodb.model.TransactWriteItemsEnhancedRequest in project aws-sdk-java-v2 by aws.

the class TransactWriteItemsTest method mixedCommands_returnValuesOnConditionCheckFailureSet_allConditionsFail.

@Test
public void mixedCommands_returnValuesOnConditionCheckFailureSet_allConditionsFail() {
    mappedTable1.putItem(r -> r.item(RECORDS_1.get(0)));
    mappedTable1.putItem(r -> r.item(RECORDS_1.get(1)));
    mappedTable2.putItem(r -> r.item(RECORDS_2.get(0)));
    Expression conditionExpression = Expression.builder().expression("#attribute = :attribute").expressionValues(singletonMap(":attribute", stringValue("99"))).expressionNames(singletonMap("#attribute", "attribute")).build();
    Key key0 = Key.builder().partitionValue(0).build();
    Key key1 = Key.builder().partitionValue(1).build();
    ReturnValuesOnConditionCheckFailure returnValues = ReturnValuesOnConditionCheckFailure.ALL_OLD;
    TransactPutItemEnhancedRequest<Record2> putItemRequest = TransactPutItemEnhancedRequest.builder(Record2.class).conditionExpression(conditionExpression).item(RECORDS_2.get(0)).returnValuesOnConditionCheckFailure(returnValues).build();
    TransactUpdateItemEnhancedRequest<Record1> updateItemRequest = TransactUpdateItemEnhancedRequest.builder(Record1.class).conditionExpression(conditionExpression).item(RECORDS_1.get(0)).returnValuesOnConditionCheckFailure(returnValues).build();
    TransactDeleteItemEnhancedRequest deleteItemRequest = TransactDeleteItemEnhancedRequest.builder().key(key1).conditionExpression(conditionExpression).returnValuesOnConditionCheckFailure(returnValues).build();
    TransactWriteItemsEnhancedRequest transactWriteItemsEnhancedRequest = TransactWriteItemsEnhancedRequest.builder().addPutItem(mappedTable2, putItemRequest).addUpdateItem(mappedTable1, updateItemRequest).addConditionCheck(mappedTable1, ConditionCheck.builder().key(key0).conditionExpression(conditionExpression).returnValuesOnConditionCheckFailure(returnValues).build()).addDeleteItem(mappedTable1, deleteItemRequest).build();
    try {
        enhancedClient.transactWriteItems(transactWriteItemsEnhancedRequest);
        fail("Expected TransactionCanceledException to be thrown");
    } catch (TransactionCanceledException e) {
        List<CancellationReason> cancellationReasons = e.cancellationReasons();
        assertThat(cancellationReasons.size(), is(4));
        cancellationReasons.forEach(r -> assertThat(r.item().isEmpty(), is(false)));
    }
}
Also used : IntStream(java.util.stream.IntStream) DynamoDbEnhancedClient(software.amazon.awssdk.enhanced.dynamodb.DynamoDbEnhancedClient) TransactDeleteItemEnhancedRequest(software.amazon.awssdk.enhanced.dynamodb.model.TransactDeleteItemEnhancedRequest) TransactUpdateItemEnhancedRequest(software.amazon.awssdk.enhanced.dynamodb.model.TransactUpdateItemEnhancedRequest) Expression(software.amazon.awssdk.enhanced.dynamodb.Expression) TransactWriteItemsEnhancedRequest(software.amazon.awssdk.enhanced.dynamodb.model.TransactWriteItemsEnhancedRequest) Matchers.nullValue(org.hamcrest.Matchers.nullValue) After(org.junit.After) Collections.singletonMap(java.util.Collections.singletonMap) Assert.fail(org.junit.Assert.fail) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) DeleteTableRequest(software.amazon.awssdk.services.dynamodb.model.DeleteTableRequest) Before(org.junit.Before) ReturnValuesOnConditionCheckFailure(software.amazon.awssdk.services.dynamodb.model.ReturnValuesOnConditionCheckFailure) TransactionCanceledException(software.amazon.awssdk.services.dynamodb.model.TransactionCanceledException) DynamoDbTable(software.amazon.awssdk.enhanced.dynamodb.DynamoDbTable) Key(software.amazon.awssdk.enhanced.dynamodb.Key) CancellationReason(software.amazon.awssdk.services.dynamodb.model.CancellationReason) TableSchema(software.amazon.awssdk.enhanced.dynamodb.TableSchema) Test(org.junit.Test) TransactPutItemEnhancedRequest(software.amazon.awssdk.enhanced.dynamodb.model.TransactPutItemEnhancedRequest) Collectors(java.util.stream.Collectors) Objects(java.util.Objects) StaticAttributeTags.primaryPartitionKey(software.amazon.awssdk.enhanced.dynamodb.mapper.StaticAttributeTags.primaryPartitionKey) List(java.util.List) ConditionCheck(software.amazon.awssdk.enhanced.dynamodb.model.ConditionCheck) Matchers.is(org.hamcrest.Matchers.is) StaticTableSchema(software.amazon.awssdk.enhanced.dynamodb.mapper.StaticTableSchema) AttributeValues.stringValue(software.amazon.awssdk.enhanced.dynamodb.internal.AttributeValues.stringValue) TransactDeleteItemEnhancedRequest(software.amazon.awssdk.enhanced.dynamodb.model.TransactDeleteItemEnhancedRequest) Expression(software.amazon.awssdk.enhanced.dynamodb.Expression) List(java.util.List) ReturnValuesOnConditionCheckFailure(software.amazon.awssdk.services.dynamodb.model.ReturnValuesOnConditionCheckFailure) TransactionCanceledException(software.amazon.awssdk.services.dynamodb.model.TransactionCanceledException) Key(software.amazon.awssdk.enhanced.dynamodb.Key) StaticAttributeTags.primaryPartitionKey(software.amazon.awssdk.enhanced.dynamodb.mapper.StaticAttributeTags.primaryPartitionKey) TransactWriteItemsEnhancedRequest(software.amazon.awssdk.enhanced.dynamodb.model.TransactWriteItemsEnhancedRequest) Test(org.junit.Test)

Example 4 with TransactWriteItemsEnhancedRequest

use of software.amazon.awssdk.enhanced.dynamodb.model.TransactWriteItemsEnhancedRequest in project aws-sdk-java-v2 by aws.

the class TransactWriteItemsTest method mixedCommands_conditionCheckFailsTransaction.

@Test
public void mixedCommands_conditionCheckFailsTransaction() {
    mappedTable1.putItem(r -> r.item(RECORDS_1.get(0)));
    mappedTable2.putItem(r -> r.item(RECORDS_2.get(0)));
    Expression conditionExpression = Expression.builder().expression("#attribute = :attribute").expressionValues(singletonMap(":attribute", stringValue("1"))).expressionNames(singletonMap("#attribute", "attribute")).build();
    Key key = Key.builder().partitionValue(0).build();
    TransactWriteItemsEnhancedRequest transactWriteItemsEnhancedRequest = TransactWriteItemsEnhancedRequest.builder().addPutItem(mappedTable2, RECORDS_2.get(1)).addUpdateItem(mappedTable1, RECORDS_1.get(1)).addConditionCheck(mappedTable1, ConditionCheck.builder().key(key).conditionExpression(conditionExpression).build()).addDeleteItem(mappedTable2, RECORDS_2.get(0)).build();
    try {
        enhancedClient.transactWriteItems(transactWriteItemsEnhancedRequest);
        fail("Expected TransactionCanceledException to be thrown");
    } catch (TransactionCanceledException ignored) {
    }
    assertThat(mappedTable1.getItem(r -> r.key(k -> k.partitionValue(1))), is(nullValue()));
    assertThat(mappedTable2.getItem(r -> r.key(k -> k.partitionValue(0))), is(RECORDS_2.get(0)));
    assertThat(mappedTable2.getItem(r -> r.key(k -> k.partitionValue(1))), is(nullValue()));
}
Also used : IntStream(java.util.stream.IntStream) DynamoDbEnhancedClient(software.amazon.awssdk.enhanced.dynamodb.DynamoDbEnhancedClient) TransactDeleteItemEnhancedRequest(software.amazon.awssdk.enhanced.dynamodb.model.TransactDeleteItemEnhancedRequest) TransactUpdateItemEnhancedRequest(software.amazon.awssdk.enhanced.dynamodb.model.TransactUpdateItemEnhancedRequest) Expression(software.amazon.awssdk.enhanced.dynamodb.Expression) TransactWriteItemsEnhancedRequest(software.amazon.awssdk.enhanced.dynamodb.model.TransactWriteItemsEnhancedRequest) Matchers.nullValue(org.hamcrest.Matchers.nullValue) After(org.junit.After) Collections.singletonMap(java.util.Collections.singletonMap) Assert.fail(org.junit.Assert.fail) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) DeleteTableRequest(software.amazon.awssdk.services.dynamodb.model.DeleteTableRequest) Before(org.junit.Before) ReturnValuesOnConditionCheckFailure(software.amazon.awssdk.services.dynamodb.model.ReturnValuesOnConditionCheckFailure) TransactionCanceledException(software.amazon.awssdk.services.dynamodb.model.TransactionCanceledException) DynamoDbTable(software.amazon.awssdk.enhanced.dynamodb.DynamoDbTable) Key(software.amazon.awssdk.enhanced.dynamodb.Key) CancellationReason(software.amazon.awssdk.services.dynamodb.model.CancellationReason) TableSchema(software.amazon.awssdk.enhanced.dynamodb.TableSchema) Test(org.junit.Test) TransactPutItemEnhancedRequest(software.amazon.awssdk.enhanced.dynamodb.model.TransactPutItemEnhancedRequest) Collectors(java.util.stream.Collectors) Objects(java.util.Objects) StaticAttributeTags.primaryPartitionKey(software.amazon.awssdk.enhanced.dynamodb.mapper.StaticAttributeTags.primaryPartitionKey) List(java.util.List) ConditionCheck(software.amazon.awssdk.enhanced.dynamodb.model.ConditionCheck) Matchers.is(org.hamcrest.Matchers.is) StaticTableSchema(software.amazon.awssdk.enhanced.dynamodb.mapper.StaticTableSchema) AttributeValues.stringValue(software.amazon.awssdk.enhanced.dynamodb.internal.AttributeValues.stringValue) Expression(software.amazon.awssdk.enhanced.dynamodb.Expression) TransactionCanceledException(software.amazon.awssdk.services.dynamodb.model.TransactionCanceledException) Key(software.amazon.awssdk.enhanced.dynamodb.Key) StaticAttributeTags.primaryPartitionKey(software.amazon.awssdk.enhanced.dynamodb.mapper.StaticAttributeTags.primaryPartitionKey) TransactWriteItemsEnhancedRequest(software.amazon.awssdk.enhanced.dynamodb.model.TransactWriteItemsEnhancedRequest) Test(org.junit.Test)

Example 5 with TransactWriteItemsEnhancedRequest

use of software.amazon.awssdk.enhanced.dynamodb.model.TransactWriteItemsEnhancedRequest in project aws-sdk-java-v2 by aws.

the class TransactWriteItemsTest method mixedCommands.

@Test
public void mixedCommands() {
    mappedTable1.putItem(r -> r.item(RECORDS_1.get(0)));
    mappedTable2.putItem(r -> r.item(RECORDS_2.get(0)));
    Expression conditionExpression = Expression.builder().expression("#attribute = :attribute").expressionValues(singletonMap(":attribute", stringValue("0"))).expressionNames(singletonMap("#attribute", "attribute")).build();
    Key key = Key.builder().partitionValue(0).build();
    TransactWriteItemsEnhancedRequest transactWriteItemsEnhancedRequest = TransactWriteItemsEnhancedRequest.builder().addConditionCheck(mappedTable1, ConditionCheck.builder().key(key).conditionExpression(conditionExpression).build()).addPutItem(mappedTable2, RECORDS_2.get(1)).addUpdateItem(mappedTable1, RECORDS_1.get(1)).addDeleteItem(mappedTable2, RECORDS_2.get(0)).build();
    enhancedClient.transactWriteItems(transactWriteItemsEnhancedRequest);
    assertThat(mappedTable1.getItem(r -> r.key(k -> k.partitionValue(1))), is(RECORDS_1.get(1)));
    assertThat(mappedTable2.getItem(r -> r.key(k -> k.partitionValue(0))), is(nullValue()));
    assertThat(mappedTable2.getItem(r -> r.key(k -> k.partitionValue(1))), is(RECORDS_2.get(1)));
}
Also used : IntStream(java.util.stream.IntStream) DynamoDbEnhancedClient(software.amazon.awssdk.enhanced.dynamodb.DynamoDbEnhancedClient) TransactDeleteItemEnhancedRequest(software.amazon.awssdk.enhanced.dynamodb.model.TransactDeleteItemEnhancedRequest) TransactUpdateItemEnhancedRequest(software.amazon.awssdk.enhanced.dynamodb.model.TransactUpdateItemEnhancedRequest) Expression(software.amazon.awssdk.enhanced.dynamodb.Expression) TransactWriteItemsEnhancedRequest(software.amazon.awssdk.enhanced.dynamodb.model.TransactWriteItemsEnhancedRequest) Matchers.nullValue(org.hamcrest.Matchers.nullValue) After(org.junit.After) Collections.singletonMap(java.util.Collections.singletonMap) Assert.fail(org.junit.Assert.fail) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) DeleteTableRequest(software.amazon.awssdk.services.dynamodb.model.DeleteTableRequest) Before(org.junit.Before) ReturnValuesOnConditionCheckFailure(software.amazon.awssdk.services.dynamodb.model.ReturnValuesOnConditionCheckFailure) TransactionCanceledException(software.amazon.awssdk.services.dynamodb.model.TransactionCanceledException) DynamoDbTable(software.amazon.awssdk.enhanced.dynamodb.DynamoDbTable) Key(software.amazon.awssdk.enhanced.dynamodb.Key) CancellationReason(software.amazon.awssdk.services.dynamodb.model.CancellationReason) TableSchema(software.amazon.awssdk.enhanced.dynamodb.TableSchema) Test(org.junit.Test) TransactPutItemEnhancedRequest(software.amazon.awssdk.enhanced.dynamodb.model.TransactPutItemEnhancedRequest) Collectors(java.util.stream.Collectors) Objects(java.util.Objects) StaticAttributeTags.primaryPartitionKey(software.amazon.awssdk.enhanced.dynamodb.mapper.StaticAttributeTags.primaryPartitionKey) List(java.util.List) ConditionCheck(software.amazon.awssdk.enhanced.dynamodb.model.ConditionCheck) Matchers.is(org.hamcrest.Matchers.is) StaticTableSchema(software.amazon.awssdk.enhanced.dynamodb.mapper.StaticTableSchema) AttributeValues.stringValue(software.amazon.awssdk.enhanced.dynamodb.internal.AttributeValues.stringValue) Expression(software.amazon.awssdk.enhanced.dynamodb.Expression) Key(software.amazon.awssdk.enhanced.dynamodb.Key) StaticAttributeTags.primaryPartitionKey(software.amazon.awssdk.enhanced.dynamodb.mapper.StaticAttributeTags.primaryPartitionKey) TransactWriteItemsEnhancedRequest(software.amazon.awssdk.enhanced.dynamodb.model.TransactWriteItemsEnhancedRequest) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)7 TransactWriteItemsEnhancedRequest (software.amazon.awssdk.enhanced.dynamodb.model.TransactWriteItemsEnhancedRequest)7 Collections.singletonMap (java.util.Collections.singletonMap)5 List (java.util.List)5 Objects (java.util.Objects)5 Collectors (java.util.stream.Collectors)5 IntStream (java.util.stream.IntStream)5 MatcherAssert.assertThat (org.hamcrest.MatcherAssert.assertThat)5 Matchers.is (org.hamcrest.Matchers.is)5 Matchers.nullValue (org.hamcrest.Matchers.nullValue)5 After (org.junit.After)5 Assert.fail (org.junit.Assert.fail)5 Before (org.junit.Before)5 Expression (software.amazon.awssdk.enhanced.dynamodb.Expression)5 Key (software.amazon.awssdk.enhanced.dynamodb.Key)5 TableSchema (software.amazon.awssdk.enhanced.dynamodb.TableSchema)5 AttributeValues.stringValue (software.amazon.awssdk.enhanced.dynamodb.internal.AttributeValues.stringValue)5 StaticAttributeTags.primaryPartitionKey (software.amazon.awssdk.enhanced.dynamodb.mapper.StaticAttributeTags.primaryPartitionKey)5 StaticTableSchema (software.amazon.awssdk.enhanced.dynamodb.mapper.StaticTableSchema)5 ConditionCheck (software.amazon.awssdk.enhanced.dynamodb.model.ConditionCheck)5