### Question:
Locations { public static Location getLocationAdjustedForGPSWeekRollover(Location loc) { long recordedTime = loc.getTime(); if(recordedTime < 1554595199000L){ recordedTime = recordedTime + 619315200000L; loc.setTime(recordedTime); } return loc; }  static Location getLocationWithAdjustedAltitude(Location loc, PreferenceHelper ph); static Location getLocationAdjustedForGPSWeekRollover(Location loc);  }### Answer:
@Test public void AdjustDateTimeForGPSRollover_WhenDateIsVeryOld_Add1024Weeks(){ Location loc = MockLocations.builder("MOCK", 12.193, 19.111).withTime(1546341071000L).build(); Location adjusted = Locations.getLocationAdjustedForGPSWeekRollover(loc); verify(loc, times(1)).setTime(2165656271000L); }
@Test public void AdjustDateTimeForGPSRollover_WhenDateIsNew_ReturnSameLocation(){ Location loc = MockLocations.builder("MOCK", 12.193, 19.111).withTime(1575408651000L).build(); Location adjusted = Locations.getLocationAdjustedForGPSWeekRollover(loc); verify(loc, times(0)).setTime(1575408651000L); }