@Test
public void testWaitForTableToBecomeActiveUpdatingThenActive() {

    // Updating table
    final TableDescription table1 = new TableDescription();
    table1.setTableStatus(TableStatus.UPDATING);
    final DescribeTableResult result1 = new DescribeTableResult().withTable(table1);
    // Active table
    final TableDescription table2 = new TableDescription();
    table2.setTableStatus(TableStatus.ACTIVE);
    final DescribeTableResult result2 = new DescribeTableResult().withTable(table2);
    EasyMock.expect(dynamoDB.describeTable(tableName)).andReturn(result1);
    EasyMock.expect(dynamoDB.describeTable(tableName)).andReturn(result2);
    PowerMock.replayAll();
    DynamoDBManager.waitForTableToBecomeActive(dynamoDB, tableName);
}