### Question:
SnapToRoute extends Snap { @Override public Location getSnappedLocation(Location location, RouteProgress routeProgress) { Location snappedLocation = snapLocationLatLng(location, routeProgress.currentStepPoints()); snappedLocation.setBearing(snapLocationBearing(routeProgress)); return snappedLocation; }  @Override Location getSnappedLocation(Location location, RouteProgress routeProgress);  }### Answer:
@Test public void getSnappedLocation_returnsProviderNameCorrectly() throws Exception { RouteProgress routeProgress = buildDefaultTestRouteProgress(); Snap snap = new SnapToRoute(); Location location = new Location("test"); Location snappedLocation = snap.getSnappedLocation(location, routeProgress); assertTrue(snappedLocation.getProvider().equals("test")); }