### Question:
Distance { public static double getSquaredDistanceToPoint( final double pFromX, final double pFromY, final double pToX, final double pToY) { final double dX = pFromX - pToX; final double dY = pFromY - pToY; return dX * dX + dY * dY; }  static double getSquaredDistanceToPoint(
            final double pFromX, final double pFromY, final double pToX, final double pToY); static double getSquaredDistanceToLine(
            final double pFromX, final double pFromY,
            final double pAX, final double pAY, final double pBX, final double pBY
    ); static double getSquaredDistanceToSegment(
            final double pFromX, final double pFromY,
            final double pAX, final double pAY, final double pBX, final double pBY
    ); static double getSquaredDistanceToProjection(
            final double pFromX, final double pFromY,
            final double pAX, final double pAY, final double pBX, final double pBY,
            final double pProjectionFactor
    ); static double getProjectionFactorToLine(
            final double pFromX, final double pFromY,
            final double pAX, final double pAY, final double pBX, final double pBY
    ); static double getProjectionFactorToSegment(
            final double pFromX, final double pFromY,
            final double pAX, final double pAY, final double pBX, final double pBY
    );  }### Answer:
@Test public void test_getSquareDistanceToPoint() { final int xA = 100; final int yA = 200; final int deltaX = 10; final int deltaY = 20; Assert.assertEquals(0, Distance.getSquaredDistanceToPoint(xA, yA, xA, yA), mDelta); Assert.assertEquals(deltaX * deltaX, Distance.getSquaredDistanceToPoint(xA, yA, xA + deltaX, yA), mDelta); Assert.assertEquals(deltaY * deltaY, Distance.getSquaredDistanceToPoint(xA, yA, xA, yA + deltaY), mDelta); Assert.assertEquals(deltaX * deltaX + deltaY * deltaY, Distance.getSquaredDistanceToPoint(xA, yA, xA + deltaX, yA + deltaY), mDelta); }