@@ -0,0 +1,2419 @@
+package org.apache.helix.integration.task;%0A%0A/*%0A * Licensed to the Apache Software Foundation (ASF) under one%0A * or more contributor license agreements.  See the NOTICE file%0A * distributed with this work for additional information%0A * regarding copyright ownership.  The ASF licenses this file%0A * to you under the Apache License, Version 2.0 (the%0A * %22License%22); you may not use this file except in compliance%0A * with the License.  You may obtain a copy of the License at%0A *%0A *   http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing,%0A * software distributed under the License is distributed on an%0A * %22AS IS%22 BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY%0A * KIND, either express or implied.  See the License for the%0A * specific language governing permissions and limitations%0A * under the License.%0A */%0A%0Aimport java.util.Map;%0A%0Aimport org.apache.helix.TestHelper;%0Aimport org.apache.helix.task.JobConfig;%0Aimport org.apache.helix.task.TaskPartitionState;%0Aimport org.apache.helix.task.TaskState;%0Aimport org.apache.helix.task.TaskUtil;%0Aimport org.apache.helix.task.Workflow;%0Aimport org.testng.Assert;%0Aimport org.testng.annotations.BeforeClass;%0Aimport org.testng.annotations.Test;%0A%0Apublic class TestUnregisteredCommand extends TaskTestBase %7B%0A%0A  @BeforeClass%0A  public void beforeClass() throws Exception %7B%0A    _numNodes = 1;%0A    _numReplicas = 1;%0A    _numDbs = 1;%0A    _numParitions = 1;%0A    super.beforeClass();%0A  %7D%0A%0A  @Test public void testUnregisteredCommand() throws InterruptedException %7B%0A    String workflowName = TestHelper.getTestMethodName();%0A    Workflow.Builder builder = new Workflow.Builder(workflowName);%0A%0A    JobConfig.Builder jobBuilder =%0A        new JobConfig.Builder().setTargetResource(WorkflowGenerator.DEFAULT_TGT_DB)%0A            .setCommand(%22OtherCommand%22).setTimeoutPerTask(10000L).setMaxAttemptsPerTask(2)%0A            .setJobCommandConfigMap(WorkflowGenerator.DEFAULT_COMMAND_CONFIG);%0A%0A    builder.addJob(%22JOB1%22, jobBuilder);%0A%0A    _driver.start(builder.build());%0A%0A    _driver.pollForWorkflowState(workflowName, TaskState.COMPLETED, TaskState.FAILED);%0A    Assert.assertEquals(_driver.getJobContext(TaskUtil.getNamespacedJobName(workflowName, %22JOB1%22))%0A        .getPartitionState(0), TaskPartitionState.ERROR);%0A    Assert.assertEquals(_driver.getJobContext(TaskUtil.getNamespacedJobName(workflowName, %22JOB1%22))%0A        .getPartitionNumAttempts(0), 1);%0A  %7D%0A%7D%0A

Add test for unregistered command