Collection<AzureAddress> getAddresses() {
        LOGGER.finest("Fetching OAuth Access Token");
        final String accessToken = fetchAccessToken();
        LOGGER.finest("Fetching instances for subscription '%s' and resourceGroup '%s'",
                subscriptionId, resourceGroup);
        Collection<AzureAddress> addresses = azureComputeApi.instances(subscriptionId, resourceGroup,
                scaleSet, tag, accessToken);
        LOGGER.finest("Found the following instances for project '%s' and zone '%s': %s",
                subscriptionId, resourceGroup,
                addresses);
        return addresses;
    }
@Test
    public void getAddressesWithConfiguredSettings() {
        // given
        String tenantId = "tenant-id";
        String clientId = "client-id";
        String clientSecret = "client-secret";
        given(azureAuthenticator.refreshAccessToken(tenantId, clientId, clientSecret)).willReturn(ACCESS_TOKEN);
        String subscriptionId = "subscription-2";
        String resourceGroup = "resource-group-2";
        String scaleSet = "scale-set-2";
        given(azureComputeApi.instances(subscriptionId, resourceGroup, scaleSet, TAG, ACCESS_TOKEN)).willReturn(ADDRESSES);

        AzureConfig azureConfig = AzureConfig.builder()
                                       .setClientId(clientId)
                                       .setTenantId(tenantId)
                                       .setClientSecret(clientSecret)
                                       .setSubscriptionId(subscriptionId)
                                       .setResourceGroup(resourceGroup)
                                       .setScaleSet(scaleSet)
                                       .setInstanceMetadataAvailable(false)
                                       .setTag(TAG)
                                       .build();
        AzureClient azureClient = new AzureClient(azureMetadataApi, azureComputeApi, azureAuthenticator, azureConfig);

        // when
        Collection<AzureAddress> result = azureClient.getAddresses();

        // then
        assertEquals(ADDRESSES, result);
    }