@Override
    public Num calculate(BarSeries series, Position position) {
        return series.one();
    }
@Test
    public void calculateWithOnePosition() {
        MockBarSeries series = new MockBarSeries(numFunction, 100, 105, 110, 100, 95, 105);
        Position position = new Position();
        AnalysisCriterion positionsCriterion = getCriterion();

        assertNumEquals(1, positionsCriterion.calculate(series, position));
    }