@Test
public void funcMaxOverTime() {

    Function sumOverTime = Function.getFunction("max_over_time");
    List<Series> series = loadMockSeries("testdata/max_over_time.test");
    Evaluator evaluator = new Evaluator(series.get(0).getPoints().last().getT());
    Expressions expressions = new Expressions();
    MatrixSelector matrixSelector = new MatrixSelector("test_metric", null,
        Duration.ofSeconds(60));
    matrixSelector.getSeriess().addAll(series);
    expressions.add(matrixSelector);
    Value value = sumOverTime.getCall().invoke(evaluator, expressions);
    Assert.assertTrue(value instanceof Vector);
    Vector vector = (Vector) value;
    Assert.assertEquals(9, vector.getSamples().get(0).getV(), 0);
    //test range=[90s]
    series = loadMockSeries("testdata/max_over_time.test");
    MatrixSelector matrixSelector2 = new MatrixSelector("test_metric", null,
        Duration.ofSeconds(90));
    matrixSelector2.getSeriess().addAll(series);
    expressions.getExpressions().clear();
    expressions.getExpressions().add(matrixSelector2);
    value = sumOverTime.getCall().invoke(evaluator, expressions);
    vector = (Vector) value;
    Assert.assertEquals(18, vector.getSamples().get(0).getV(), 0);
}