test_class.declarator: pointList = new PointList()
test_class.modifier: private final
test_class.original_string: private final PointList pointList = new PointList();
test_class.type: PointList
test_class.var_name: pointList
test_class.declarator: from = Coordinates.valueOf(-Double.MIN_VALUE, Double.MIN_VALUE)
test_class.modifier: private final
test_class.original_string: private final Coordinates from = Coordinates.valueOf(-Double.MIN_VALUE, Double.MIN_VALUE);
test_class.type: Coordinates
test_class.var_name: from
test_class.declarator: to = Coordinates.valueOf(Double.MAX_VALUE, -Double.MAX_VALUE)
test_class.modifier: private final
test_class.original_string: private final Coordinates to = Coordinates.valueOf(Double.MAX_VALUE, -Double.MAX_VALUE);
test_class.type: Coordinates
test_class.var_name: to
test_class.declarator: graphHopper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private GraphHopperOSM graphHopper;
test_class.type: GraphHopperOSM
test_class.var_name: graphHopper
test_class.declarator: ghResponse
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private GHResponse ghResponse;
test_class.type: GHResponse
test_class.var_name: ghResponse
test_class.declarator: pathWrapper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private PathWrapper pathWrapper;
test_class.type: PathWrapper
test_class.var_name: pathWrapper
test_class.declarator: graphHopperStorage
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private GraphHopperStorage graphHopperStorage;
test_class.type: GraphHopperStorage
test_class.var_name: graphHopperStorage
test_class.file: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/routing/GraphHopperRouterTest.java
test_class.identifier: GraphHopperRouterTest
test_case.body: @Test
      void getDistance_should_throw_exception_when_no_route_exists() {
          // arrange
          whenRouteReturnResponse();
          when(ghResponse.hasErrors()).thenReturn(true);
          when(ghResponse.getErrors()).thenReturn(Collections.singletonList(new RuntimeException()));
          GraphHopperRouter graphHopperRouter = new GraphHopperRouter(graphHopper);
  
          // act & assert
          assertThatThrownBy(() -> graphHopperRouter.travelTimeMillis(from, to))
                  .isNotInstanceOf(NullPointerException.class)
                  .isInstanceOf(RuntimeException.class)
                  .hasMessageContaining("No route");
      }
test_case.class_method_signature: GraphHopperRouterTest.getDistance_should_throw_exception_when_no_route_exists()
test_case.full_signature: @Test void getDistance_should_throw_exception_when_no_route_exists()
test_case.identifier: getDistance_should_throw_exception_when_no_route_exists
test_case.invocations: whenRouteReturnResponse thenReturn when hasErrors thenReturn when getErrors singletonList hasMessageContaining isInstanceOf isNotInstanceOf assertThatThrownBy travelTimeMillis
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void getDistance_should_throw_exception_when_no_route_exists()
focal_class.declarator: graphHopper
focal_class.modifier: private final
focal_class.original_string: private final GraphHopperOSM graphHopper;
focal_class.type: GraphHopperOSM
focal_class.var_name: graphHopper
focal_class.file: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/routing/GraphHopperRouter.java
focal_class.identifier: GraphHopperRouter
focal_class.interfaces: implements Router, DistanceCalculator, Region
focal_class.class_method_signature: GraphHopperRouter.GraphHopperRouter(GraphHopperOSM graphHopper)
focal_class.full_signature: @Autowired  GraphHopperRouter(GraphHopperOSM graphHopper)
focal_class.identifier: GraphHopperRouter
focal_class.modifiers: @Autowired
focal_class.parameters: (GraphHopperOSM graphHopper)
focal_class.signature:  GraphHopperRouter(GraphHopperOSM graphHopper)
focal_class.class_method_signature: GraphHopperRouter.getPath(Coordinates from, Coordinates to)
focal_class.full_signature: @Override public List<Coordinates> getPath(Coordinates from, Coordinates to)
focal_class.identifier: getPath
focal_class.modifiers: @Override public
focal_class.parameters: (Coordinates from, Coordinates to)
focal_class.return: List<Coordinates>
focal_class.signature: List<Coordinates> getPath(Coordinates from, Coordinates to)
focal_class.class_method_signature: GraphHopperRouter.travelTimeMillis(Coordinates from, Coordinates to)
focal_class.full_signature: @Override public long travelTimeMillis(Coordinates from, Coordinates to)
focal_class.identifier: travelTimeMillis
focal_class.modifiers: @Override public
focal_class.parameters: (Coordinates from, Coordinates to)
focal_class.return: long
focal_class.signature: long travelTimeMillis(Coordinates from, Coordinates to)
focal_class.class_method_signature: GraphHopperRouter.getBounds()
focal_class.full_signature: @Override public BoundingBox getBounds()
focal_class.identifier: getBounds
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: BoundingBox
focal_class.signature: BoundingBox getBounds()
focal_method.body: @Override
      public long travelTimeMillis(Coordinates from, Coordinates to) {
          GHRequest ghRequest = new GHRequest(
                  from.latitude().doubleValue(),
                  from.longitude().doubleValue(),
                  to.latitude().doubleValue(),
                  to.longitude().doubleValue());
          GHResponse ghResponse = graphHopper.route(ghRequest);
          // TODO return wrapper that can hold both the result and error explanation instead of throwing exception
          if (ghResponse.hasErrors()) {
              throw new DistanceCalculationException("No route from " + from + " to " + to, ghResponse.getErrors().get(0));
          }
          return ghResponse.getBest().getTime();
      }
focal_method.class_method_signature: GraphHopperRouter.travelTimeMillis(Coordinates from, Coordinates to)
focal_method.full_signature: @Override public long travelTimeMillis(Coordinates from, Coordinates to)
focal_method.identifier: travelTimeMillis
focal_method.invocations: doubleValue latitude doubleValue longitude doubleValue latitude doubleValue longitude route hasErrors get getErrors getTime getBest
focal_method.modifiers: @Override public
focal_method.parameters: (Coordinates from, Coordinates to)
focal_method.return: long
focal_method.signature: long travelTimeMillis(Coordinates from, Coordinates to)