OverlayManager implements TouchInput.PanResponder, TouchInput.RotateResponder { public void setCompassButtonEnabled(boolean enabled) { compassButtonEnabled = enabled; handleCompassButtonEnabledChanged(); } OverlayManager(MapView mapView, MapController mapController, MapDataManager mapDataManager,
      MapStateManager mapStateManager);   OverlayManager(MapView mapView, MapController mapController, MapDataManager mapDataManager,
      MapStateManager mapStateManager, LostApiClient lostApiClient); void setMyLocationEnabled(boolean enabled); void setMyLocationEnabled(boolean enabled, boolean persistMapData); boolean isMyLocationEnabled(); void setCompassOnClickListener(View.OnClickListener listener); void setFindMeOnClickListener(View.OnClickListener listener); void setZoomInOnClickListener(View.OnClickListener listener); void setZoomOutOnClickListener(View.OnClickListener listener); void setZoomButtonsEnabled(boolean enabled); boolean isZoomButtonsEnabled(); void setCompassButtonEnabled(boolean enabled); boolean isCompassEnabled(); MapData addPolyline(Polyline polyline); MapData addPolyline(Polyline polyline, boolean persistMapData); void removePolyline(); MapData addPolygon(Polygon polygon); MapData addPolygon(Polygon polygon, boolean persistMapData); void removePolygon(); MapData addMarker(Marker marker); MapData addMarker(Marker marker, boolean persistMapData); void removeMarker(); void drawRoutePins(LngLat start, LngLat end); void drawRoutePins(LngLat start, LngLat end, boolean persistMapData); void clearRoutePins(); void drawDroppedPin(LngLat point); void drawDroppedPin(LngLat point, boolean persistMapData); void clearDroppedPin(); void drawSearchResult(LngLat point, boolean active); void drawSearchResult(LngLat point, boolean active, int index); void drawSearchResult(LngLat point, boolean active, int index, boolean persistMapData); void clearSearchResult(); void drawRouteLocationMarker(LngLat point); void drawRouteLocationMarker(LngLat point, boolean persistMapData); void clearRouteLocationMarker(); void drawRouteLine(List<LngLat> points); void drawRouteLine(List<LngLat> points, boolean persistMapData); void clearRouteLine(); void drawTransitRouteLine(@NonNull List<LngLat> points, @Nullable List<LngLat> stations,
      @NonNull String colorHex); void drawTransitRouteLine(@NonNull List<LngLat> points, @Nullable List<LngLat> stations,
      @NonNull String colorHex, boolean persistMapData); void clearTransitRouteLine(); void setPersistMapData(boolean persistOnRecreation); void restoreMapData(); @Override boolean onPan(float startX, float startY, float endX, float endY); @Override boolean onFling(float posX, float posY, float velocityX, float velocityY); @Override boolean onRotate(float x, float y, float rotation); static final int ZOOM_BUTTON_ANIMATION_DURATION_MILLIS; static final float ZOOM_BUTTON_CHANGE; }
@Test public void onClickCompass_shouldResetMapRotation() throws Exception { overlayManager.setCompassButtonEnabled(true); compassButton.performClick(); assertThat(mapStateManager.getRotation()).isEqualTo(0); assertThat(mapController.getRotation()).isEqualTo(0); }