class ZuulFiltersModule extends AbstractModule {

    @VisibleForTesting
    String[] findFilterLocations(AbstractConfiguration config) {
        String[] locations = config.getStringArray("zuul.filters.locations");
        if (locations == null) {
            locations = new String[]{"inbound","outbound","endpoint"};
        }
        String[] filterLocations = Arrays.stream(locations)
                .map(String::trim)
                .filter(blank.negate())
                .toArray(String[]::new);

        if (filterLocations.length != 0) {
            LOG.info("Using filter locations: ");
            for (String location : filterLocations) {
                LOG.info("  " + location);
            }
        }
        return filterLocations;
    }

}

class ZuulFiltersModuleTest {

    @Mock AbstractConfiguration configuration;
     ZuulFiltersModule module;

    @Test
    public void testEmptyFilterLocations() {

        when(configuration.getStringArray(eq("zuul.filters.locations"))).thenReturn(new String[0]);

        String[] filterLocations = module.findFilterLocations(configuration);

        assertThat(filterLocations.length, equalTo(0));
    }

}