### Question:
ExtendedShell extends Shell { @Override public Object evaluate(Input input) { List<String> words = input.words(); Object toReturn = super.evaluate(new ExtendedInput(input)); SshContext ctx = SSH_THREAD_CONTEXT.get(); if (ctx != null) { ctx.setPostProcessorsList(null); if (isKeyCharInList(words)) { List<Integer> indexes = IntStream.range(0, words.size()).filter(i -> KEY_CHARS.contains(words.get(i))).boxed().collect(Collectors.toList()); List<PostProcessorObject> postProcessors = new ArrayList<>(); for (Integer index : indexes) { if (words.size() > index + 1) { String keyChar = words.get(index); if (keyChar.equals(PIPE)) { String postProcessorName = words.get(index + 1); int currentIndex = 2; String word = words.size() > index + currentIndex ? words.get(index + currentIndex) : null; List<String> params = new ArrayList<>(); while (word != null && !KEY_CHARS.contains(word)) { params.add(word); currentIndex++; word = words.size() > index + currentIndex ? words.get(index + currentIndex) : null; } postProcessors.add(new PostProcessorObject(postProcessorName, params)); } else if (keyChar.equals(ARROW)) { postProcessors.add(new PostProcessorObject(SavePostProcessor.SAVE, Collections.singletonList(words.get(index + 1)))); } } } LOGGER.debug("Found {} post processors", postProcessors.size()); ctx.setPostProcessorsList(postProcessors); } } return toReturn; } ExtendedShell(ResultHandler resultHandler, List<PostProcessor> postProcessors); @Override Object evaluate(Input input); @Override List<CompletionProposal> complete(CompletionContext context);  }### Answer:
@Test void evaluate() { SSH_THREAD_CONTEXT.set(new SshContext(null, null, null, null)); ExtendedShell shell = new ExtendedShell(result -> { }, new ArrayList<>()); shell.evaluate(() -> "one two three"); assertNull(SSH_THREAD_CONTEXT.get().getPostProcessorsList()); shell.evaluate(() -> "one two three | grep test > /tmp/file"); List<PostProcessorObject> postProcessors = SSH_THREAD_CONTEXT.get().getPostProcessorsList(); assertNotNull(postProcessors); assertEquals(2, postProcessors.size()); assertInList(postProcessors, new GrepPostProcessor().getName()); assertInList(postProcessors, new SavePostProcessor().getName()); }