code: @SuppressWarnings("squid:MethodCyclomaticComplexity")
      private Status convertStatus(final Action.Status status){
          switch (status) {
          case SCHEDULED:
              return Status.SCHEDULED;
          case ERROR:
              return Status.ERROR;
          case FINISHED:
              return Status.FINISHED;
          case CANCELED:
              return Status.CANCELLED;
          case RETRIEVED:
          case RUNNING:
          case WARNING:
          case DOWNLOAD:
          case CANCELING:
              return Status.RUNNING;
          case DOWNLOADED:
              return Action.ActionType.DOWNLOAD_ONLY.equals(rolloutType) ? Status.FINISHED : Status.RUNNING;
          default:
              throw new IllegalArgumentException("State " + status + "is not valid");
          }
      }
docs: really complex.