### Question:
LocationUtil { public static List<Location> getLocationsBetween(List<Location> locationList, long minimumTimestamp, long maximumTimestamp) { List<Location> matchingLocations = new ArrayList<>(); for (Location location : locationList) { if (location.getTimestamp() < minimumTimestamp || location.getTimestamp() >= maximumTimestamp) { continue; } matchingLocations.add(location); } return matchingLocations; }  static Location calculateMeanLocationFromLast(List<Location> locationList, long amount, TimeUnit timeUnit); static Location calculateMeanLocation(Location... locations); static Location calculateMeanLocation(List<Location> locationList); static List<Location> getLocationsBetween(List<Location> locationList, long minimumTimestamp, long maximumTimestamp); static List<Location> getLocationsFromLast(List<Location> locationList, long amount, TimeUnit timeUnit); static List<Location> getLocationsSince(List<Location> locationList, long timestamp); static List<Location> getLocationsBefore(List<Location> locationList, long timestamp);  }### Answer:
@Test public void getLocationsBetween_locationListWithTimestamps_correctTimestampFilteredLocations() throws Exception { final Location firstLocation = LocationTest.SOCCER_FIELD_TOP_LEFT; final Location secondLocation = LocationTest.SOCCER_FIELD_TOP_RIGHT; final Location thirdLocation = LocationTest.SOCCER_FIELD_BOTTOM_LEFT; firstLocation.setTimestamp(0); secondLocation.setTimestamp(1); thirdLocation.setTimestamp(2); List<Location> timestampLocationList = new ArrayList<>(Arrays.asList( firstLocation, secondLocation, thirdLocation )); List<Location> actualLocations = LocationUtil.getLocationsBetween(timestampLocationList, 1, 2); List<Location> expectedLocations = new ArrayList<>(Arrays.asList( secondLocation )); assertEquals(expectedLocations, actualLocations); }