@Override
    public double distanceBtw(Point p1, Point p2) {

        numCalls++;

        confirmRequiredDataIsPresent(p1);
        confirmRequiredDataIsPresent(p2);

        Duration timeDelta = Duration.between(p1.time(), p2.time()); //can be positive of negative
        timeDelta = timeDelta.abs();

        Double horizontalDistanceInNm = p1.distanceInNmTo(p2);

        Double horizontalDistanceInFeet = horizontalDistanceInNm * Spherical.feetPerNM();
        Double altitudeDifferenceInFeet = Math.abs(p1.altitude().inFeet() - p2.altitude().inFeet());

        Double distInFeet = hypot(horizontalDistanceInFeet, altitudeDifferenceInFeet);

        return (distanceCoef * distInFeet) + (timeCoef * timeDelta.toMillis());
    }
@Test
    public void testPointsRequireAltitude() {

        PointDistanceMetric metric = new PointDistanceMetric(1.0, 1.0);

        Point point = new PointBuilder()
            .latLong(0.0, 0.0)
            .time(Instant.EPOCH)
            .build();

        assertThrows(
            IllegalArgumentException.class,
            () -> metric.distanceBtw(point, point),
            "Points should require altitude"
        );
    }