### Question:
AbstractCommand implements Command, Runnable { @Override public void setOutputStream(OutputStream out) { if (logStreams && !(out instanceof LoggerOutputStream)) { this.out = new LoggerOutputStream(out); } else { this.out = out; } } 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 testSetOutputStream() { cmd.logStreams = true; cmd.setOutputStream(NullOutputStream.INSTANCE); assertThat(cmd.getOutputStream()).isInstanceOf(LoggerOutputStream.class); }