@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); }
public static Location getLocationAdjustedForGPSWeekRollover(Location loc) { long recordedTime = loc.getTime(); if(recordedTime < 1554595199000L){ recordedTime = recordedTime + 619315200000L; loc.setTime(recordedTime); } return loc; }
Locations { public static Location getLocationAdjustedForGPSWeekRollover(Location loc) { long recordedTime = loc.getTime(); if(recordedTime < 1554595199000L){ recordedTime = recordedTime + 619315200000L; loc.setTime(recordedTime); } return loc; } }
Locations { public static Location getLocationAdjustedForGPSWeekRollover(Location loc) { long recordedTime = loc.getTime(); if(recordedTime < 1554595199000L){ recordedTime = recordedTime + 619315200000L; loc.setTime(recordedTime); } return loc; }  }
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); }
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);  }