### Question:
RoutingRequestBuilder { public RoutingRequestBuilder addTripParameters(TripParameters tripParams) { if (tripParams.isSetAllowed_modes()) { Set<TravelMode> allowedModes = tripParams.getAllowed_modes(); setTravelModes(new TravelModeSet(allowedModes)); } if (tripParams.isSetStart_time()) { setStartTime(tripParams.getStart_time()); } else if (tripParams.isSetArrive_by()) { setArriveBy(tripParams.getArrive_by()); } setOrigin(tripParams.getOrigin()); setDestination(tripParams.getDestination()); return this; } RoutingRequestBuilder();  RoutingRequestBuilder(TripParameters tripParams);  RoutingRequestBuilder(RoutingRequest prototypeRequest); RoutingRequestBuilder setStartTime(long startTime); RoutingRequestBuilder setArriveBy(long arriveBy); RoutingRequestBuilder addTripParameters(TripParameters tripParams); RoutingRequestBuilder setTravelModes(TravelModeSet modes); RoutingRequestBuilder setTravelModes(Collection<TravelMode> modes); RoutingRequestBuilder setOrigin(Location origin); RoutingRequestBuilder setOrigin(LatLng origin); RoutingRequestBuilder setDestination(Location dest); RoutingRequestBuilder setDestination(LatLng dest); RoutingRequestBuilder setBatch(boolean batch); RoutingRequestBuilder setGraph(Graph g); RoutingRequestBuilder setNumItineraries(int n); RoutingRequest build();  }### Answer:
@Test public void testAddTripParameters() { TripParameters tp = new TripParameters(); tp.addToAllowed_modes(TravelMode.WALK); tp.addToAllowed_modes(TravelMode.CAR); LatLng originLatLng = new LatLng(1.0, 2.5); Location origin = new Location(); origin.setLat_lng(originLatLng); origin.setHeading(137.2); LatLng destLatLng = new LatLng(-3.0, 9.7); Location dest = new Location(); dest.setLat_lng(destLatLng); tp.setOrigin(origin); tp.setDestination(dest); RoutingRequest rr = (new RoutingRequestBuilder()).addTripParameters(tp).build(); GenericLocation from = rr.getFrom(); Coordinate expectedFromCoord = new Coordinate(2.5, 1.0); assertEquals(expectedFromCoord, from.getCoordinate()); assertEquals(origin.getHeading(), from.getHeading(), 0.0); GenericLocation to = rr.getTo(); Coordinate expectedToCoord = new Coordinate(9.7, -3.0); assertEquals(expectedToCoord, to.getCoordinate()); assertFalse(to.hasHeading()); for (TravelMode tm : tp.getAllowed_modes()) { TraverseModeSet modeSet = rr.getModes(); TraverseMode traverseMode = (new TravelModeWrapper(tm)).toTraverseMode(); assertTrue(modeSet.contains(traverseMode)); } }