### Question:
Providers { public static ProviderMetadata withId(String id) throws NoSuchElementException { return find(all(), ProviderPredicates.id(id)); }  static Function<ProviderMetadata, String> idFunction(); static Function<ProviderMetadata, ApiMetadata> apiMetadataFunction(); static Iterable<ProviderMetadata> fromServiceLoader(); static Iterable<ProviderMetadata> all(); static ProviderMetadata withId(String id); static Iterable<ProviderMetadata> viewableAs(TypeToken<? extends View> viewableAs); static Iterable<ProviderMetadata> viewableAs(Class<? extends View> viewableAs); static Iterable<ProviderMetadata> apiMetadataAssignableFrom(TypeToken<? extends ApiMetadata> api); static Iterable<ProviderMetadata> contextAssignableFrom(
            TypeToken<? extends Context> context); static Iterable<ProviderMetadata> boundedByIso3166Code(String iso3166Code); static Iterable<ProviderMetadata> boundedByIso3166Code(String iso3166Code,
            TypeToken<? extends View> viewableAs); static Iterable<ProviderMetadata> boundedByIso3166Code(String iso3166Code,
            Class<? extends View> viewableAs); static Iterable<ProviderMetadata> collocatedWith(ProviderMetadata providerMetadata); static Iterable<ProviderMetadata> collocatedWith(ProviderMetadata providerMetadata,
            TypeToken<? extends View> viewableAs); static Iterable<ProviderMetadata> collocatedWith(ProviderMetadata providerMetadata,
            Class<? extends View> viewableAs);  }### Answer:
@Test public void testWithId() { ProviderMetadata providerMetadata; try { providerMetadata = Providers.withId("fake-id"); fail("Looking for a provider with an id that doesn't exist should " + "throw an exception."); } catch (NoSuchElementException nsee) { } providerMetadata = Providers.withId(testBlobstoreProvider.getId()); assertEquals(testBlobstoreProvider, providerMetadata); assertNotEquals(testBlobstoreProvider, testComputeProvider); assertNotEquals(testBlobstoreProvider, testYetAnotherComputeProvider); }
@Test public void testWithId() { ProviderMetadata providerMetadata; try { providerMetadata = Providers.withId("fake-id"); fail("Looking for a provider with an id that doesn't exist should " + "throw an exception."); } catch (NoSuchElementException nsee) { ; } providerMetadata = Providers.withId(testBlobstoreProvider.getId()); assertEquals(testBlobstoreProvider, providerMetadata); assertNotEquals(testBlobstoreProvider, testComputeProvider); assertNotEquals(testBlobstoreProvider, testYetAnotherComputeProvider); }