@Test
public void testCheckNoCredentialsProvider() throws StatusCheckException, IOException {

    // Mock getting client and credentials successfully and table exists
    String tableName = "testTable";
    when(listTablesResult.getTableNames()).thenReturn(Collections.singletonList(tableName));
    when(amazonDynamoDB.listTables()).thenReturn(listTablesResult);
    DynamoDBClientAndCredentials dynamoDBClientAndCredentials = new DynamoDBClientAndCredentials(amazonDynamoDB, null);
    when(dynamoDBClientFetcher.getDynamoDBClient(any(), any())).thenReturn(dynamoDBClientAndCredentials);
    DynamoDBStatusCheckerTestClass dynamoDBStatusChecker = new DynamoDBStatusCheckerTestClass(tableName);
    dynamoDBStatusChecker.check();
    Mockito.verify(amazonDynamoDB, times(1)).shutdown();
    Mockito.verify(awsCredentialsProvider, times(0)).close();
}