use of com.amazonaws.services.dynamodbv2.model.AmazonDynamoDBException in project athenz by yahoo.
the class DynamoDBWorkloadRecordStoreConnectionTest method testUpdateWorkloadRecordException.
@Test
public void testUpdateWorkloadRecordException() {
WorkloadRecord workloadRecord = new WorkloadRecord();
Mockito.doThrow(new AmazonDynamoDBException("invalid operation")).when(table).updateItem(ArgumentMatchers.any(UpdateItemSpec.class));
DynamoDBWorkloadRecordStoreConnection dbConn = getDBConnection();
boolean requestSuccess = dbConn.updateWorkloadRecord(workloadRecord);
Assert.assertFalse(requestSuccess);
dbConn.close();
}
Aggregations