FirstZone implements ImplicitLocationSupplier { @Inject FirstZone(@Memoized Supplier<Set<? extends Location>> locationsSupplier) { this.locationsSupplier = checkNotNull(locationsSupplier, "locationsSupplierSupplier"); } @Inject  FirstZone(@Memoized Supplier<Set<? extends Location>> locationsSupplier); @Override Location get();  }
@Test public void testFirstZone() { Supplier<Set<? extends Location>> supplier = Suppliers.<Set<? extends Location>> ofInstance(ImmutableSet .<Location> of(provider, region, zone)); FirstZone fn = new FirstZone(supplier); assertEquals(fn.get(), zone); }