### Question:
Position { public static double longitudeDiff(double a, double b) { a = to180(a); b = to180(b); return Math.abs(to180(a - b)); } Position(double lat, double lon);  Position(double lat, double lon, double alt); static Position create(double lat, double lon); static Position position(double lat, double lon); static Position create(double lat, double lon, double alt); final double getLat(); final double getLon(); final double getAlt(); @Override final String toString(); final Position predict(double distanceKm, double courseDegrees); static double toDegrees(double degrees, double minutes, double seconds); Double getLatitudeOnGreatCircle(Position position, double longitudeDegrees); LongitudePair getLongitudeOnGreatCircle(Position position, double latitudeDegrees); final Position[] getEarthLimb(int radials); final double getDistanceToKm(Position position); final double getBearingDegrees(Position position); static double getBearingDifferenceDegrees(double bearing1, double bearing2); final double getDistanceKmToPath(Position p1, Position p2); static String toDegreesMinutesDecimalMinutesLatitude(double lat); static String toDegreesMinutesDecimalMinutesLongitude(double lon); static void assertWithMsg(boolean assertion, String msg); final Position getPositionAlongPath(Position position, double proportion); final List<Position> getPositionsAlongPath(Position position, double maxSegmentLengthKm); final Position to360(); final Position ensureContinuous(Position lastPosition); final boolean isWithin(List<Position> positions); static List<Position> interpolateLongitude(List<? extends Position> positions); static List<Position> interpolateLongitude(List<? extends Position> positions,
            double maxLongitudeDifference); @Override final boolean equals(Object o); @Override final int hashCode(); final double getDistanceToPathKm(List<Position> positions); final double getDistanceToSegmentKm(Position p1, Position p2); final Position getClosestIntersectionWithSegment(Position p1, Position p2); boolean isOutside(List<Position> path, double minDistanceKm); static double longitudeDiff(double a, double b); static double to180(double d); Position normalizeLongitude(); static final double EARTH_RADIUS_KM; static final double EARTH_CIRCUMFERENCE_KM; }### Answer:
@Test public void testLongitudeDiff() { assertEquals(10, longitudeDiff(15, 5), PRECISION); assertEquals(10, longitudeDiff(-175, 175), PRECISION); assertEquals(10, longitudeDiff(175, -175), PRECISION); assertEquals(5, longitudeDiff(149, 154), PRECISION); }