public static Collection<ExternalResource> getExternalResourcesCollection(
            Configuration config) {
        return getExternalResourceAmountMap(config).entrySet().stream()
                .map(entry -> new ExternalResource(entry.getKey(), entry.getValue()))
                .collect(Collectors.toList());
    }
@Test
    public void testGetExternalResourcesCollection() {
        final Configuration config = new Configuration();
        config.set(
                ExternalResourceOptions.EXTERNAL_RESOURCE_LIST,
                Collections.singletonList(RESOURCE_NAME_1));
        config.setLong(
                ExternalResourceOptions.getAmountConfigOptionForResource(RESOURCE_NAME_1),
                RESOURCE_AMOUNT_1);

        final Collection<ExternalResource> externalResources =
                ExternalResourceUtils.getExternalResourcesCollection(config);

        assertThat(externalResources.size(), is(1));
        assertThat(
                externalResources,
                contains(new ExternalResource(RESOURCE_NAME_1, RESOURCE_AMOUNT_1)));
    }