@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 testDistanceComputation_longitude() {

        PointDistanceMetric metric1 = new PointDistanceMetric(1.0, 1.0);
        PointDistanceMetric metric2 = new PointDistanceMetric(1.0, 2.0);

        Point p1 = new PointBuilder()
            .latLong(0.0, 0.0)
            .altitude(Distance.ofFeet(0.0))
            .time(Instant.EPOCH)
            .build();

        Point p2 = new PointBuilder()
            .latLong(0.0, 1.0)
            .altitude(Distance.ofFeet(0.0))
            .time(Instant.EPOCH)
            .build();

        double TOLERANCE = 0.00001;

        assertTrue(metric1.distanceBtw(p1, p2) != 0.0);

        assertEquals(
            2.0 * metric1.distanceBtw(p1, p2), metric2.distanceBtw(p1, p2), TOLERANCE,
            "Metric2 applies a coefficient of 2 on distance, thus metric1 needs to be expanded to match"
        );
    }