void (@NotNull NextAwareState left, @NotNull PrevAwareState right) { final Set<TraceElement> leftValues = new HashSet<>(left.getTrace()); final Set<TraceElement> rightValues = new HashSet<>(right.getTrace()); checkThatMappingsIsCorrect(leftValues, rightValues, left::getNextValues, right::getPrevValues); checkThatMappingsIsCorrect(rightValues, leftValues, right::getPrevValues, left::getNextValues); }