### Question:
AbstractCommand implements Command, Runnable { @Override public void setInputStream(InputStream in) { if (logStreams && !(in instanceof LoggerInputStream)) { this.in = new LoggerInputStream(in); } else { this.in = in; } } AbstractCommand(Context ctx); abstract C command(String command); @Override void setInputStream(InputStream in); @Override void setOutputStream(OutputStream out); @Override void setErrorStream(OutputStream err); @Override void setExitCallback(ExitCallback callback); @Override void start(Environment env); void addEndCallback(EndCallback<C> callback); @Override void destroy();  }### Answer:
@Test public void testSetInputStream() throws IOException { cmd.logStreams = true; cmd.setInputStream(new ByteArrayInputStream(new byte[]{6, '*', 9, '=', 42})); assertThat(cmd.getInputStream()).isInstanceOf(LoggerInputStream.class); cmd.getInputStream().read(new byte[4]); assertThat(cmd.getInputStream().read()).isEqualTo(42); }