@Test
public void testCalDistanceVecVec() {

    DenseMatrix denseResult = distance.calc(distance.prepareVectorData(Tuple2.of(denseVector1, null)),
        (FastDistanceData)distance.prepareVectorData(Tuple2.of(denseVector2, null)));
    Assert.assertEquals(denseResult.get(0, 0), 0.2852, 0.01);
    DenseMatrix sparseResult = distance.calc(distance.prepareVectorData(Tuple2.of(sparseVector1, null)),
        (FastDistanceData)distance.prepareVectorData(Tuple2.of(sparseVector2, null)));
    Assert.assertEquals(sparseResult.get(0, 0), 0.76, 0.01);
}