### Question:
LocationLayerController { Set<AnimatorListenerHolder> getAnimationListeners() { Set<AnimatorListenerHolder> holders = new HashSet<>(); holders.add(new AnimatorListenerHolder(MapboxAnimator.ANIMATOR_LAYER_LATLNG, latLngValueListener)); if (renderMode == RenderMode.GPS) { holders.add(new AnimatorListenerHolder(MapboxAnimator.ANIMATOR_LAYER_GPS_BEARING, gpsBearingValueListener)); } else if (renderMode == RenderMode.COMPASS) { holders.add( new AnimatorListenerHolder(MapboxAnimator.ANIMATOR_LAYER_COMPASS_BEARING, compassBearingValueListener)); } if (renderMode == RenderMode.COMPASS || renderMode == RenderMode.NORMAL) { holders.add(new AnimatorListenerHolder(MapboxAnimator.ANIMATOR_LAYER_ACCURACY, accuracyValueListener)); } if (options.pulseEnabled()) { holders.add(new AnimatorListenerHolder(MapboxAnimator.ANIMATOR_PULSING_CIRCLE, pulsingCircleRadiusListener)); } return holders; } 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 onNewLatLngValue_locationFeatureIsUpdated() { OnRenderModeChangedListener internalRenderModeChangedListener = mock(OnRenderModeChangedListener.class); OnIndicatorPositionChangedListener internalIndicatorPositionChangedListener = mock(OnIndicatorPositionChangedListener.class); GeoJsonSource locationSource = mock(GeoJsonSource.class); when(style.getSourceAs(LOCATION_SOURCE)).thenReturn(locationSource); LayerSourceProvider sourceProvider = buildLayerProvider(); 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); getAnimationListener(ANIMATOR_LAYER_LATLNG, layer.getAnimationListeners()).onNewAnimationValue(new LatLng()); verify(locationSource, times(2)).setGeoJson(locationFeature); verify(internalIndicatorPositionChangedListener).onIndicatorPositionChanged(any(Point.class)); }