### Question:
PostProcessorsCommand extends AbstractCommand { @ShellMethod(key = COMMAND_POST_PROCESSORS, value = "Display the available post processors") @ShellMethodAvailability("postprocessorsAvailability") public CharSequence postprocessors() { AttributedStringBuilder result = new AttributedStringBuilder(); result.append("Available Post-Processors\n\n", AttributedStyle.BOLD); for (PostProcessor postProcessor : postProcessors) { result.append("\t" + postProcessor.getName() + ": ", AttributedStyle.BOLD); Class<?> cls = ((Class) ((ParameterizedType) (postProcessor.getClass().getGenericInterfaces())[0]).getActualTypeArguments()[0]); result.append(cls.getName() + "\n", AttributedStyle.DEFAULT); } return result; } PostProcessorsCommand(SshShellHelper helper, SshShellProperties properties,
                                 List<PostProcessor> postProcessors); @ShellMethod(key = COMMAND_POST_PROCESSORS, value = "Display the available post processors") @ShellMethodAvailability("postprocessorsAvailability") CharSequence postprocessors(); static final String GROUP; static final String COMMAND_POST_PROCESSORS; }### Answer:
@Test void postprocessors() { GrepPostProcessor grep = new GrepPostProcessor(); JsonPointerPostProcessor json = new JsonPointerPostProcessor(); String result = new PostProcessorsCommand(new SshShellHelper(), new SshShellProperties(), Arrays.asList(grep, json)).postprocessors().toString(); assertTrue(result.startsWith("Available Post-Processors")); assertTrue(result.contains(grep.getName())); assertTrue(result.contains(json.getName())); }