### Question:
ExporterConfig { public QuerySyncConfiguration getQuerySyncConfiguration() { return querySyncConfiguration; } private  ExporterConfig(Map<String, Object> yaml); static ExporterConfig createEmptyConfig(); static ExporterConfig loadConfig(InputStream inputStream); Map<String, Object> scrapeMetrics(MBeanSelector selector, JsonObject response); MBeanSelector[] getEffectiveQueries(); MBeanSelector[] getQueries(); static ExporterConfig loadConfig(Map<String, Object> yamlConfig); QuerySyncConfiguration getQuerySyncConfiguration(); Integer getRestPort(); void append(ExporterConfig config2); void replace(ExporterConfig config2); @Override String toString();  }### Answer:
@Test public void whenQuerySyncDefined_returnIt() { ExporterConfig config = loadFromString(CONFIG_WITH_SYNC_SPEC); final QuerySyncConfiguration syncConfiguration = config.getQuerySyncConfiguration(); assertThat(syncConfiguration.getUrl(), equalTo("http: assertThat(syncConfiguration.getRefreshInterval(), equalTo(3L)); }
@Test public void whenQuerySyncDefinedWithoutInterval_useDefault() { ExporterConfig config = loadFromString(CONFIG_WITH_SYNC_URL); final QuerySyncConfiguration syncConfiguration = config.getQuerySyncConfiguration(); assertThat(syncConfiguration.getUrl(), equalTo("http: assertThat(syncConfiguration.getRefreshInterval(), equalTo(10L)); }