@Test public void testGetTableStatus() { final TableDescription description = new TableDescription(); final DescribeTableResult result = new DescribeTableResult().withTable(description); EasyMock.expect(dynamoDB.describeTable(tableName)).andReturn(result).anyTimes(); for (final TableStatus status : TableStatus.values()) { description.setTableStatus(status); PowerMock.replayAll(); assertEquals(status, DynamoDBManager.getTableStatus(dynamoDB, tableName)); PowerMock.verifyAll(); } }
public static TableStatus getTableStatus(final AmazonDynamoDB dynamoDB, final String tableName) { return TableStatus.fromValue(dynamoDB.describeTable(tableName).getTable().getTableStatus()); }
DynamoDBManager { public static TableStatus getTableStatus(final AmazonDynamoDB dynamoDB, final String tableName) { return TableStatus.fromValue(dynamoDB.describeTable(tableName).getTable().getTableStatus()); } }
DynamoDBManager { public static TableStatus getTableStatus(final AmazonDynamoDB dynamoDB, final String tableName) { return TableStatus.fromValue(dynamoDB.describeTable(tableName).getTable().getTableStatus()); } private  DynamoDBManager(); }
DynamoDBManager { public static TableStatus getTableStatus(final AmazonDynamoDB dynamoDB, final String tableName) { return TableStatus.fromValue(dynamoDB.describeTable(tableName).getTable().getTableStatus()); } private  DynamoDBManager(); static TableDescription createTable(final AmazonDynamoDB dynamoDB, final CreateTableRequest request); static boolean doesTableExist(final AmazonDynamoDB dynamoDB, final String tableName); static TableStatus getTableStatus(final AmazonDynamoDB dynamoDB, final String tableName); static void waitForTableToBecomeActive(final AmazonDynamoDB dynamoDB, final String tableName); }
DynamoDBManager { public static TableStatus getTableStatus(final AmazonDynamoDB dynamoDB, final String tableName) { return TableStatus.fromValue(dynamoDB.describeTable(tableName).getTable().getTableStatus()); } private  DynamoDBManager(); static TableDescription createTable(final AmazonDynamoDB dynamoDB, final CreateTableRequest request); static boolean doesTableExist(final AmazonDynamoDB dynamoDB, final String tableName); static TableStatus getTableStatus(final AmazonDynamoDB dynamoDB, final String tableName); static void waitForTableToBecomeActive(final AmazonDynamoDB dynamoDB, final String tableName);  }