@Test
public void updateBinaryPartitionSummaryTest(){

    Row[] rows =
        new Row[] {
            Row.of("prefix1", "{\"prefix1\": 0.9, \"prefix0\": 0.1}"),
            Row.of("prefix1", "{\"prefix1\": 0.8, \"prefix0\": 0.2}"),
            Row.of("prefix1", "{\"prefix1\": 0.7, \"prefix0\": 0.3}"),
            Row.of("prefix0", "{\"prefix1\": 0.75, \"prefix0\": 0.25}"),
            Row.of("prefix0", "{\"prefix1\": 0.6, \"prefix0\": 0.4}"),
            Row.of(null, "{\"prefix1\": 0.75, \"prefix0\": 0.25}"),
        };
    Object[] labels = new Object[]{"prefix1", "prefix0"};
    TypeInformation labelType = Types.STRING;
    ClassificationEvaluationUtil.BinaryPartitionSummary summary = new ClassificationEvaluationUtil
        .BinaryPartitionSummary(0, 0, 0, 0);
    for(Row row : rows){
        Tuple3<Double, Boolean, Double> t = ClassificationEvaluationUtil.getBinaryDetailStatistics(row, labels, labelType);
        if(null != t) {
            ClassificationEvaluationUtil.updateBinaryPartitionSummary(summary, t);
        }
    }
    Assert.assertEquals(summary.curNegative, 2);
    Assert.assertEquals(summary.curPositive, 3);
    Assert.assertEquals((int)summary.taskId, 0);
    Assert.assertEquals(summary.maxScore, 0.9, 0.01);
}