@Override
    public double distanceBtw(Point p1, Point p2) {
        /*
         * Note: We intentionally do not check these inputs for NPEs or missing values.
         *
         * Performing these checks has a significant performance impact because this method is
         * typically called extremely often. This real cost is not justified given the frequency in
         * which lat, long, or time data will be missing.
         */

        numCalls++;

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

        p1.distanceInNmTo(p2);
        Double horizontalDistanceInNm = p1.distanceInNmTo(p2);

        Double horizontalDistanceInFeet = horizontalDistanceInNm * Spherical.feetPerNM();

        return (distanceCoef * horizontalDistanceInFeet) + (timeCoef * timeDelta.toMillis());
    }
@Test
    public void testInputPointsWithSameTime() {
        FlatDistanceMetric metric = new FlatDistanceMetric(1.0, 5.0);

        Point p1 = (new PointBuilder()).latLong(LatLong.of(0.0, 0.0)).time(Instant.EPOCH).build();
        Point p2 = (new PointBuilder()).latLong(LatLong.of(0.0, 0.0)).time(Instant.EPOCH).build();

        assertEquals(
            0.0,
            metric.distanceBtw(p1, p2),
            0.0001
        );
    }