@Test
public void testMinSimilarity() {

	int len = 200, size = 10;
	Row[] left = new Row[len];
	Random random = new Random();
	for(int i = 0; i < left.length; i++){
		left[i] = Row.of(i, new SparseVector(size, new int[]{random.nextInt(size), random.nextInt(size)}, new double[]{random.nextDouble(), random.nextDouble()}));
	}
	MemSourceBatchOp leftData = new MemSourceBatchOp(Arrays.asList(left), new String[] {"leftId", "leftVec"});
	BatchOperator op = new ApproxVectorSimilarityTopNLSHBatchOp()
		.setLeftCol("leftVec")
		.setRightCol("leftVec")
		.setLeftIdCol("leftId")
		.setRightIdCol("leftId")
		.setDistanceType("JACCARD")
		.setOutputCol("distance");
	List<Row> res = op.linkFrom(leftData, leftData).collect();
	Assert.assertTrue(res.size() >= 200 && res.size() <= 1000);
}