@Test
public void testGetDistanceSquared() {

  Vector other = new RandomAccessSparseVector(test.size());
  other.set(1, -2);
  other.set(2, -5);
  other.set(3, -9);
  other.set(4, 1);
  double expected = test.minus(other).getLengthSquared();
  assertTrue("a.getDistanceSquared(b) != a.minus(b).getLengthSquared",
             Math.abs(expected - test.getDistanceSquared(other)) < 10.0E-7);
}