### Question:
OTPServiceImpl implements OTPService.Iface { @Override public BulkPathsResponse BulkFindPaths(BulkPathsRequest req) throws TException { LOG.debug("BulkFindPaths called"); long startTime = System.currentTimeMillis(); PathOptions pathOptions = req.getOptions(); BulkPathsResponse res = new BulkPathsResponse(); for (TripParameters trip : req.getTrips()) { TripPaths tripPaths = computePaths(trip, pathOptions); res.addToPaths(tripPaths); } res.setCompute_time_millis(System.currentTimeMillis() - startTime); return res; }  @Override GraphVerticesResponse GetVertices(GraphVerticesRequest req); @Override GraphEdgesResponse GetEdges(GraphEdgesRequest req); @Override FindNearestVertexResponse FindNearestVertex(FindNearestVertexRequest req); @Override BulkFindNearestVertexResponse BulkFindNearestVertex(BulkFindNearestVertexRequest req); @Override FindNearestEdgesResponse FindNearestEdges(FindNearestEdgesRequest req); @Override BulkFindNearestEdgesResponse BulkFindNearestEdges(BulkFindNearestEdgesRequest req); @Override FindPathsResponse FindPaths(FindPathsRequest req); @Override BulkPathsResponse BulkFindPaths(BulkPathsRequest req);  }### Answer:
@Test public void testBulkFindPaths() throws TException { PathOptions opts = new PathOptions(); opts.setNum_paths(1); opts.setReturn_detailed_path(true); BulkPathsRequest req = new BulkPathsRequest(); req.setOptions(opts); for (int i = 0; i < 4; ++i) { TripParameters trip = new TripParameters(); trip.addToAllowed_modes(TravelMode.CAR); P2<Location> pair = pickOriginAndDest(); trip.setOrigin(pair.getFirst()); trip.setDestination(pair.getSecond()); req.addToTrips(trip); } req.validate(); BulkPathsResponse res = serviceImpl.BulkFindPaths(req); for (TripPaths paths : res.getPaths()) { int expectedPathsSize = paths.isNo_paths_found() ? 0 : 1; assertEquals(expectedPathsSize, paths.getPathsSize()); if (!paths.isSetNo_paths_found()) { Path p = paths.getPaths().get(0); checkPath(p); } } }