ImportBaggers extends BaseImport<BaggersData> { @Override protected String getUrl() { return StringUtils.appendOptional(WS_DATA_ENDPOINT, mPrefs.isUsingHrMode() ? WS_BAGGERS_HR_URL : WS_BAGGERS_URL); } @Inject  ImportBaggers(Preferences prefs, OkHttpClient client, ObjectMapper mapper, JsonToDatabaseDao dao);   }
@Test public void should_return_baggers_url_in_normal_mode() { when(prefs.isUsingHrMode()).thenReturn(false); String url = importer.getUrl(); assertThat(url).contains(BuildConfig.WS_BAGGERS_URL); }
@Test public void should_return_HR_baggers_url_in_HR_mode() { when(prefs.isUsingHrMode()).thenReturn(true); String url = importer.getUrl(); assertThat(url).contains(BuildConfig.WS_BAGGERS_HR_URL); }