@Override
  public Result apply(PathData item, int depth) throws IOException {
    if (expression != null) {
      return expression.apply(item, -1);
    }
    return Result.PASS;
  }
@Test
  public void apply() throws IOException {
    PathData item = mock(PathData.class);
    when(expr.apply(item, -1)).thenReturn(Result.PASS).thenReturn(Result.FAIL);
    assertEquals(Result.PASS, test.apply(item, -1));
    assertEquals(Result.FAIL, test.apply(item, -1));
    verify(expr, times(2)).apply(item, -1);
    verifyNoMoreInteractions(expr);
  }