SceneUpdateManager { List<SceneUpdate> getUpdatesFor(String apiKey, Locale locale, boolean transitOverlayEnabled, boolean bikeOverlayEnabled, boolean pathOverlayEnabled) { final ArrayList<SceneUpdate> sceneUpdates = new ArrayList<>(2); sceneUpdates.add(getApiKeyUpdate(apiKey)); sceneUpdates.add(new SceneUpdate(STYLE_GLOBAL_VAR_LANGUAGE, locale.getLanguage())); sceneUpdates.add(getTransitOverlayUpdate(transitOverlayEnabled)); sceneUpdates.add(getBikeOverlayUpdate(bikeOverlayEnabled)); sceneUpdates.add(getPathOverlayUpdate(pathOverlayEnabled)); return sceneUpdates; }    }
@Test public void getUpdatesFor_shouldReturnCorrectKeysAndValues() { List<SceneUpdate> updates = manager.getUpdatesFor(apiKey, locale, false, false, false); assertThat(updates.size()).isEqualTo(5); assertThat(updates.get(0).getPath()).isEqualTo("global.sdk_mapzen_api_key"); assertThat(updates.get(0).getValue()).isEqualTo(apiKey); assertThat(updates.get(1).getPath()).isEqualTo("global.ux_language"); assertThat(updates.get(1).getValue()).isEqualTo(locale.getLanguage()); assertThat(updates.get(2).getPath()).isEqualTo("global.sdk_transit_overlay"); assertThat(updates.get(2).getValue()).isEqualTo("false"); assertThat(updates.get(3).getPath()).isEqualTo("global.sdk_bike_overlay"); assertThat(updates.get(3).getValue()).isEqualTo("false"); assertThat(updates.get(4).getPath()).isEqualTo("global.sdk_path_overlay"); assertThat(updates.get(4).getValue()).isEqualTo("false"); }