InjectionExample { public List<City> filterByPopulation(List<City> cities) { return FluentIterable.from(cities).filter(smallPopulationPredicate).toList(); } @Autowired  InjectionExample(Function<List<Book>, Map<String, String>> bookListConverter,
                            Supplier<List<Book>> bookListSupplier,
                            @Qualifier("lowRainfall") Predicate<City> lowRainfallPredicate,
                            @Qualifier("smallPopulation") Predicate<City> smallPopulationPredicate); Map<String, String> convertBooks(List<Book> books); List<Book> getListOfBooks(); List<City> filterByPopulation(List<City> cities); List<City> filterByRainfall(List<City> cities);  }
@Test public void testFilterByPopulation() throws Exception { List<City> cityList = example.filterByPopulation(cities); assertThat(cityList.size(), is(1)); assertThat(cityList.get(0), is(city)); }