### Question:
ReplayLocationDispatcher implements Runnable { void pause() { stopDispatching(); } ReplayLocationDispatcher(@NonNull List<Location> locationsToReplay);   ReplayLocationDispatcher(List<Location> locationsToReplay, Handler handler); @Override void run();  }### Answer:
@Test public void checksStopDispatchingWhenPause() { List<Location> anyLocations = mock(List.class); Handler aHandler = mock(Handler.class); ReplayLocationDispatcher theReplayLocationDispatcher = new ReplayLocationDispatcher(anyLocations, aHandler); theReplayLocationDispatcher.pause(); verify(aHandler, times(1)).removeCallbacks(eq(theReplayLocationDispatcher)); }