### Question:
ReplayLocationDispatcher implements Runnable { void update(@NonNull List<Location> locationsToReplay) { checkValidInput(locationsToReplay); this.locationsToReplay = new CopyOnWriteArrayList<>(locationsToReplay); initialize(); } ReplayLocationDispatcher(@NonNull List<Location> locationsToReplay);   ReplayLocationDispatcher(List<Location> locationsToReplay, Handler handler); @Override void run();  }### Answer:
@Test(expected = IllegalArgumentException.class) public void checksNonNullLocationListRequiredWhenUpdate() { List<Location> anyLocations = mock(List.class); Handler aHandler = mock(Handler.class); ReplayLocationDispatcher theReplayLocationDispatcher = new ReplayLocationDispatcher(anyLocations, aHandler); List<Location> nullLocations = null; theReplayLocationDispatcher.update(nullLocations); }
@Test(expected = IllegalArgumentException.class) public void checksNonEmptyLocationListRequiredWhenUpdate() { List<Location> anyLocations = mock(List.class); Handler aHandler = mock(Handler.class); ReplayLocationDispatcher theReplayLocationDispatcher = new ReplayLocationDispatcher(anyLocations, aHandler); List<Location> empty = Collections.emptyList(); theReplayLocationDispatcher.update(empty); }