@Test
public void setStatus() throws Exception {

  final AsyncReportStatusListener listener =
    new AsyncReportStatusListener( "", UUID.randomUUID(), "", Collections.<ReportProgressListener>emptyList() );
  listener.setStatus( null );
  listener.setStatus( AsyncExecutionStatus.QUEUED );
  assertEquals( AsyncExecutionStatus.QUEUED, listener.getState().getStatus() );
  listener.setStatus( AsyncExecutionStatus.FINISHED );
  assertEquals( AsyncExecutionStatus.FINISHED, listener.getState().getStatus() );
  listener.setStatus( AsyncExecutionStatus.CANCELED );
  assertEquals( AsyncExecutionStatus.CANCELED, listener.getState().getStatus() );
  listener.setStatus( AsyncExecutionStatus.FINISHED );
  assertEquals( AsyncExecutionStatus.CANCELED, listener.getState().getStatus() );
}