private HostRoleCommandEntity createSkippedTask(String role, String componentName,
                                                  String hostname, String commandDetail,
                                                  RoleCommand roleCommand, String customCommandName) {
    HostRoleCommandEntity result = new HostRoleCommandEntity();

    ServiceComponentHostEvent event = new ServiceComponentHostOpInProgressEvent(componentName, hostname, 77l);
    ServiceComponentHostEventWrapper eventWrapper = new ServiceComponentHostEventWrapper(event);
    result.setEvent(eventWrapper.getEventJson());

    HostEntity hostEntity = new HostEntity();
    hostEntity.setHostName(hostname);
    result.setHostEntity(hostEntity);

    result.setTaskId(7l);
    result.setExitcode(1);
    result.setOutputLog("/output.log");
    result.setErrorLog("/error.log");
    result.setStdOut("Some stdout".getBytes());
    result.setStdError("Some stderr".getBytes());
    result.setCommandDetail(commandDetail);
    result.setRole(Role.valueOf(role));
    result.setRoleCommand(roleCommand);
    result.setCustomCommandName(customCommandName);
    result.setStatus(HostRoleStatus.SKIPPED_FAILED);

    return result;
  }
Tests workflow with failed host component tasks only
ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/AutoSkipFailedSummaryActionTest.java