code: private void ensureConsistency(final ADTNode<ADTState<I, O>, I, O> leaf) {
  
          final ADTState<I, O> state = leaf.getHypothesisState();
          final Word<I> as = state.getAccessSequence();
          final Word<O> asOut = this.hypothesis.computeOutput(as);
  
          ADTNode<ADTState<I, O>, I, O> iter = leaf;
  
          while (iter != null) {
              final Pair<Word<I>, Word<O>> trace = ADTUtil.buildTraceForNode(iter);
  
              final Word<I> input = trace.getFirst();
              final Word<O> output = trace.getSecond();
  
              final Word<O> hypOut = this.hypothesis.computeStateOutput(state, input);
  
              if (!hypOut.equals(output)) {
                  this.openCounterExamples.add(new DefaultQuery<>(as.concat(input), asOut.concat(output)));
              }
  
              iter = ADTUtil.getStartOfADS(iter).getParent();
          }
      }
docs: Ensure that the output behavior of a hypothesis state matches the observed output behavior recorded in the ADT.
  Any differences in output behavior yields new counterexamples.
  
  @param leaf
  the leaf whose hypothesis state should be checked