@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");
}