JustProvider implements Supplier<Set<? extends Location>> { @Override public Set<? extends Location> get() { return ImmutableSet.of(new LocationBuilder().scope(LocationScope.PROVIDER).id(providerName) .description(endpointSupplier.get().toASCIIString()).iso3166Codes(isoCodesSupplier).build()); } @Inject  JustProvider(@Provider String providerName, @Provider Supplier<URI> endpointSupplier, @Iso3166 Set<String> isoCodesSupplier); @Override Set<? extends Location> get();  }
@Test public void test() throws SecurityException, NoSuchMethodException { JustProvider fn = new JustProvider("servo", Suppliers.ofInstance(URI.create("http: assertEquals( fn.get(), ImmutableSet.of(new LocationBuilder().scope(LocationScope.PROVIDER).id("servo").description("http: .iso3166Codes(ImmutableSet.of("US")).build())); }