### Question:
OTPServiceImpl implements OTPService.Iface { @Override public FindNearestVertexResponse FindNearestVertex(FindNearestVertexRequest req) throws TException { LOG.debug("FindNearestVertex called"); long startTime = System.currentTimeMillis(); VertexQuery q = req.getQuery(); VertexResult result = findNearbyVertex(q); FindNearestVertexResponse res = new FindNearestVertexResponse(); res.setResult(result); 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 testFindNearestVertex() throws TException { for (Vertex v : graph.getVertices()) { FindNearestVertexRequest req = new FindNearestVertexRequest(); VertexQuery q = new VertexQuery(); q.setLocation(getLocationForVertex(v)); req.setQuery(q); FindNearestVertexResponse res = serviceImpl.FindNearestVertex(req); GraphVertex gv = res.getResult().getNearest_vertex(); int expectedId = v.getIndex(); int actualId = gv.getId(); if (expectedId != actualId) { LatLng ll = gv.getLat_lng(); Coordinate outCoord = new Coordinate(ll.getLng(), ll.getLat()); assertTrue(v.getCoordinate().distance(outCoord) < 0.00001); } } }