@Test public void processTest_statusIsNull() { SuiteStatusResult nullSuiteStatus = null; StatusProcessor processor = ProcessorFactory .produce(nullSuiteStatus, REPORT_URL, null, runnerTerminator); assertThat(processor, is(nullValue())); }
static StatusProcessor produce(SuiteStatusResult suiteStatusResult, String reportUrl, RedirectWriter redirectWriter, RunnerTerminator runnerTerminator) { StatusProcessor processor = null; if (suiteStatusResult != null) { switch (suiteStatusResult.getStatus()) { case PROGRESS: processor = new ProgressStatusProcessor(suiteStatusResult); break; case ERROR: processor = new ProcessingErrorStatusProcessor(suiteStatusResult); break; case FATAL_ERROR: processor = new FatalErrorStatusProcessor(suiteStatusResult); break; case FINISHED: processor = new SuiteFinishedProcessor(reportUrl, redirectWriter, runnerTerminator); break; case UNKNOWN: break; default: processor = new UnexpectedStatusProcessor(suiteStatusResult); break; } } return processor; }
ProcessorFactory { static StatusProcessor produce(SuiteStatusResult suiteStatusResult, String reportUrl, RedirectWriter redirectWriter, RunnerTerminator runnerTerminator) { StatusProcessor processor = null; if (suiteStatusResult != null) { switch (suiteStatusResult.getStatus()) { case PROGRESS: processor = new ProgressStatusProcessor(suiteStatusResult); break; case ERROR: processor = new ProcessingErrorStatusProcessor(suiteStatusResult); break; case FATAL_ERROR: processor = new FatalErrorStatusProcessor(suiteStatusResult); break; case FINISHED: processor = new SuiteFinishedProcessor(reportUrl, redirectWriter, runnerTerminator); break; case UNKNOWN: break; default: processor = new UnexpectedStatusProcessor(suiteStatusResult); break; } } return processor; } }
ProcessorFactory { static StatusProcessor produce(SuiteStatusResult suiteStatusResult, String reportUrl, RedirectWriter redirectWriter, RunnerTerminator runnerTerminator) { StatusProcessor processor = null; if (suiteStatusResult != null) { switch (suiteStatusResult.getStatus()) { case PROGRESS: processor = new ProgressStatusProcessor(suiteStatusResult); break; case ERROR: processor = new ProcessingErrorStatusProcessor(suiteStatusResult); break; case FATAL_ERROR: processor = new FatalErrorStatusProcessor(suiteStatusResult); break; case FINISHED: processor = new SuiteFinishedProcessor(reportUrl, redirectWriter, runnerTerminator); break; case UNKNOWN: break; default: processor = new UnexpectedStatusProcessor(suiteStatusResult); break; } } return processor; } private  ProcessorFactory(); }
ProcessorFactory { static StatusProcessor produce(SuiteStatusResult suiteStatusResult, String reportUrl, RedirectWriter redirectWriter, RunnerTerminator runnerTerminator) { StatusProcessor processor = null; if (suiteStatusResult != null) { switch (suiteStatusResult.getStatus()) { case PROGRESS: processor = new ProgressStatusProcessor(suiteStatusResult); break; case ERROR: processor = new ProcessingErrorStatusProcessor(suiteStatusResult); break; case FATAL_ERROR: processor = new FatalErrorStatusProcessor(suiteStatusResult); break; case FINISHED: processor = new SuiteFinishedProcessor(reportUrl, redirectWriter, runnerTerminator); break; case UNKNOWN: break; default: processor = new UnexpectedStatusProcessor(suiteStatusResult); break; } } return processor; } private  ProcessorFactory();  }
ProcessorFactory { static StatusProcessor produce(SuiteStatusResult suiteStatusResult, String reportUrl, RedirectWriter redirectWriter, RunnerTerminator runnerTerminator) { StatusProcessor processor = null; if (suiteStatusResult != null) { switch (suiteStatusResult.getStatus()) { case PROGRESS: processor = new ProgressStatusProcessor(suiteStatusResult); break; case ERROR: processor = new ProcessingErrorStatusProcessor(suiteStatusResult); break; case FATAL_ERROR: processor = new FatalErrorStatusProcessor(suiteStatusResult); break; case FINISHED: processor = new SuiteFinishedProcessor(reportUrl, redirectWriter, runnerTerminator); break; case UNKNOWN: break; default: processor = new UnexpectedStatusProcessor(suiteStatusResult); break; } } return processor; } private  ProcessorFactory();   }