### Question:
LocationLayerController { void cameraTiltUpdated(double tilt) { locationLayerRenderer.cameraTiltUpdated(tilt); } LocationLayerController(MapboxMap mapboxMap, Style style,
                          LayerSourceProvider layerSourceProvider,
                          LayerFeatureProvider featureProvider,
                          LayerBitmapProvider bitmapProvider,
                          @NonNull LocationComponentOptions options,
                          @NonNull OnRenderModeChangedListener internalRenderModeChangedListener,
                          @NonNull OnIndicatorPositionChangedListener internalIndicatorPositionChangedListener,
                          boolean useSpecializedLocationLayer);   }### Answer:
@Test public void updateForegroundOffset_foregroundIconPropertyIsUpdated() { OnRenderModeChangedListener internalRenderModeChangedListener = mock(OnRenderModeChangedListener.class); OnIndicatorPositionChangedListener internalIndicatorPositionChangedListener = mock(OnIndicatorPositionChangedListener.class); LayerSourceProvider sourceProvider = buildLayerProvider(); GeoJsonSource locationSource = mock(GeoJsonSource.class); when(sourceProvider.generateSource(any(Feature.class))).thenReturn(locationSource); LayerBitmapProvider bitmapProvider = mock(LayerBitmapProvider.class); LocationComponentOptions options = mock(LocationComponentOptions.class); Feature locationFeature = mock(Feature.class); LocationLayerController layer = new LocationLayerController( mapboxMap, mapboxMap.getStyle(), sourceProvider, buildFeatureProvider(locationFeature, options), bitmapProvider, options, internalRenderModeChangedListener, internalIndicatorPositionChangedListener, false); layer.cameraTiltUpdated(2d); verify(locationFeature).addProperty(eq(PROPERTY_FOREGROUND_ICON_OFFSET), any(JsonElement.class)); }
@Test public void updateForegroundOffset_shadowPropertyIsUpdated() { OnRenderModeChangedListener internalRenderModeChangedListener = mock(OnRenderModeChangedListener.class); OnIndicatorPositionChangedListener internalIndicatorPositionChangedListener = mock(OnIndicatorPositionChangedListener.class); LayerSourceProvider sourceProvider = buildLayerProvider(); GeoJsonSource locationSource = mock(GeoJsonSource.class); when(sourceProvider.generateSource(any(Feature.class))).thenReturn(locationSource); LayerBitmapProvider bitmapProvider = mock(LayerBitmapProvider.class); LocationComponentOptions options = mock(LocationComponentOptions.class); Feature locationFeature = mock(Feature.class); LocationLayerController layer = new LocationLayerController( mapboxMap, mapboxMap.getStyle(), sourceProvider, buildFeatureProvider(locationFeature, options), bitmapProvider, options, internalRenderModeChangedListener, internalIndicatorPositionChangedListener, false); layer.cameraTiltUpdated(2d); verify(locationFeature).addProperty(eq(PROPERTY_SHADOW_ICON_OFFSET), any(JsonElement.class)); }