@Test
public void testUpdateLabel() {

    DenseVector label = distance.prepareVectorData(Tuple2.of(denseVector1, null)).getLabel();
    Assert.assertEquals(label.size(), 3);
    Assert.assertEquals(label.get(0), 0.642, 0.001);
    Assert.assertEquals(label.get(1), 0.719, 0.001);
    Assert.assertEquals(label.get(2), 0.262, 0.001);
    FastDistanceMatrixData matrixData = initMatrixData();
    Assert.assertEquals(matrixData.label.numCols(), 2);
    Assert.assertEquals(matrixData.label.numRows(), 3);
    double[] expect = new double[]{0.642, 0.719, 0.262, 0.173, 0.492, 0.852};
    double[] predict = matrixData.getLabel().getData();
    for (int i = 0; i < expect.length; i++) {
        Assert.assertEquals(expect[i], predict[i], 0.001);
    }
}