@Test void test_location_without_distance_map_should_throw_exception() { PlanningLocation planningLocation = PlanningLocationFactory.testLocation(0); PlanningLocation otherLocation = PlanningLocationFactory.testLocation(1); assertThatIllegalStateException().isThrownBy(() -> planningLocation.distanceTo(otherLocation)); }
public static PlanningLocation testLocation(long id) { return testLocation(id, PlanningLocationFactory::failFast); }
PlanningLocationFactory { public static PlanningLocation testLocation(long id) { return testLocation(id, PlanningLocationFactory::failFast); } }
PlanningLocationFactory { public static PlanningLocation testLocation(long id) { return testLocation(id, PlanningLocationFactory::failFast); } private  PlanningLocationFactory(); }
PlanningLocationFactory { public static PlanningLocation testLocation(long id) { return testLocation(id, PlanningLocationFactory::failFast); } private  PlanningLocationFactory(); static PlanningLocation fromDomain(Location location); static PlanningLocation fromDomain(Location location, DistanceMap distanceMap); static PlanningLocation testLocation(long id); static PlanningLocation testLocation(long id, DistanceMap distanceMap); }
PlanningLocationFactory { public static PlanningLocation testLocation(long id) { return testLocation(id, PlanningLocationFactory::failFast); } private  PlanningLocationFactory(); static PlanningLocation fromDomain(Location location); static PlanningLocation fromDomain(Location location, DistanceMap distanceMap); static PlanningLocation testLocation(long id); static PlanningLocation testLocation(long id, DistanceMap distanceMap);  }