### Question:
DemoCommand extends AbstractHealthIndicator { @ShellMethod("Interactive command") public void interactive(boolean fullscreen, @ShellOption(defaultValue = "3000") long delay) { KeyBinding binding = KeyBinding.builder() .description("K binding example") .key("k").input(() -> LOGGER.info("In specific action triggered by key 'k' !")).build(); Interactive interactive = Interactive.builder().input((size, currentDelay) -> { LOGGER.info("In interactive command for input..."); List<AttributedString> lines = new ArrayList<>(); AttributedStringBuilder sb = new AttributedStringBuilder(size.getColumns()); sb.append("\nCurrent time", AttributedStyle.BOLD).append(" : "); sb.append(String.format("%8tT", new Date())); lines.add(sb.toAttributedString()); SecureRandom sr = new SecureRandom(); lines.add(new AttributedStringBuilder().append(helper.progress(sr.nextInt(100)), AttributedStyle.DEFAULT.foreground(sr.nextInt(6) + 1)).toAttributedString()); lines.add(AttributedString.fromAnsi(SshShellHelper.INTERACTIVE_LONG_MESSAGE + "\n")); return lines; }).binding(binding).fullScreen(fullscreen).refreshDelay(delay).build(); helper.interactive(interactive); } DemoCommand(SshShellHelper helper); @ShellMethod("Echo command") String echo(@ShellOption(valueProvider = CustomValuesProvider.class) String message); @ShellMethod("Terminal size command") Size size(); @ShellMethod("Progress command") void progress(int progress); @ShellMethod("File command") void file(
            @ShellOption(defaultValue = ShellOption.NULL) File file,
            @ShellOption(valueProvider = ExtendedFileValueProvider.class, defaultValue = ShellOption.NULL) File extended); @ShellMethod("Interactive command") void interactive(boolean fullscreen, @ShellOption(defaultValue = "3000") long delay); @ShellMethod("Ex command") void ex(); @ShellMethod("Welcome command") String welcome(); @ShellMethod("Confirmation command") String conf(); @ShellMethod("Admin command") @ShellMethodAvailability("adminAvailability") String admin(); Availability adminAvailability(); @ShellMethod("Authentication command") SshAuthentication authentication(); @ShellMethod("Displays ssh env information") String displaySshEnv(); @ShellMethod("Displays ssh session information") String displaySshSession(); @Scheduled(initialDelay = 0, fixedDelay = 60000) void logWithDelay(); @Scheduled(initialDelay = 0, fixedRate = 60000) void logWithRate(); @Scheduled(cron = "0/60 * * * * *") void logWithCron();  }### Answer:
@Test void interactive() throws Exception { when(reader.read(100L)).thenReturn(113); cmd.interactive(false, 1000); }