public void testOverlap() {
long[] k1 = {1, 2, 5, 6};
double[] val1 = {3, 1, 2, 1};
long[] k2 = {2, 3, 5, 6, 7};
double[] val2 = {1, 7, 2, 5, 0};
SparseVector v1 = MutableSparseVector.wrap(k1, val1).freeze();
SparseVector v2 = MutableSparseVector.wrap(k2, val2).freeze();
assertEquals(1, similarity.similarity(v1, v1), EPSILON);
assertEquals(1, similarity.similarity(v2, v2), EPSILON);
assertEquals(0.29049645, similarity.similarity(v1, v2), EPSILON);
}