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