### Question:
UrlConfigSource extends AbstractConfigSource implements WatchableSource<URL>, ParsableSource, PollableSource<Instant> { @Override public Optional<String> mediaType() { return super.mediaType(); } private  UrlConfigSource(Builder builder); static UrlConfigSource create(Config metaConfig); static Builder builder(); @Override URL target(); @Override Class<URL> targetType(); @Override Optional<ConfigParser> parser(); @Override Optional<String> mediaType(); @Override Optional<PollingStrategy> pollingStrategy(); @Override Optional<ChangeWatcher<Object>> changeWatcher(); @Override boolean isModified(Instant stamp); @Override Optional<Content> load();  }### Answer:
@Test public void testGetMediaTypeSet() throws MalformedURLException { UrlConfigSource configSource = (UrlConfigSource) ConfigSources .url(new URL("http: .optional() .mediaType(TEST_MEDIA_TYPE) .build(); assertThat(configSource.mediaType(), is(Optional.of(TEST_MEDIA_TYPE))); }
@Test public void testGetMediaTypeGuessed() throws MalformedURLException { UrlConfigSource configSource = (UrlConfigSource) ConfigSources .url(new URL("http: .optional() .build(); assertThat(configSource.mediaType(), is(Optional.empty())); }
@Test public void testGetMediaTypeUnknown() throws MalformedURLException { UrlConfigSource configSource = (UrlConfigSource) ConfigSources .url(new URL("http: .optional() .build(); assertThat(configSource.mediaType(), is(Optional.empty())); }