@Test
public void testApply() {

    double[][] data = new double[][]{
        {1, 2, 3},
        {1, 4, 8},
        {1, 8, 16},
    };
    Vectorizer<Integer, double[], Integer, Double> vectorizer = new DoubleArrayVectorizer<>(0, 1, 2);
    BinarizationPreprocessor<Integer, double[]> preprocessor = new BinarizationPreprocessor<>(
        7,
        vectorizer
    );
    double[][] postProcessedData = new double[][]{
        {0, 0, 0},
        {0, 0, 1},
        {0, 1, 1}
    };
   for (int i = 0; i < data.length; i++)
       assertArrayEquals(postProcessedData[i], preprocessor.apply(i, data[i]).features().asArray(), 1e-8);
}