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