@Test
public void testClientNullTables() throws IOException {

    // Mock getting client and credentials successfully but client returns null instead of tables
    String tableName = "testTable";
    when(amazonDynamoDB.listTables()).thenReturn(null);
    DynamoDBClientAndCredentials dynamoDBClientAndCredentials = new DynamoDBClientAndCredentials(amazonDynamoDB, awsCredentialsProvider);
    when(dynamoDBClientFetcher.getDynamoDBClient(any(), any())).thenReturn(dynamoDBClientAndCredentials);
    DynamoDBStatusCheckerTestClass dynamoDBStatusChecker = new DynamoDBStatusCheckerTestClass(tableName);
    try {
        dynamoDBStatusChecker.check();
        fail();
    } catch (StatusCheckException ex) {
        assertNull(ex.getMessage());
        assertEquals(500, ex.getCode());
    }
    Mockito.verify(amazonDynamoDB, times(1)).shutdown();
    Mockito.verify(awsCredentialsProvider, times(1)).close();
}