TaskSpec registerRunningTaskAttempt(ContainerId containerId, int taskIdx) {

      TaskSpec taskSpec = createBaseTaskSpec(VERTEX_NAME1, vertexId1, taskIdx);

      taskCommunicator
          .registerRunningTaskAttempt(containerId, taskSpec, new HashMap<String, LocalResource>(),
              new Credentials(), false, 2);
      return taskSpec;
    }
Wrapper class which is responsible for setting up various mocks required for different tests.
llap-tez/src/test/org/apache/hadoop/hive/llap/tezplugins/TestLlapTaskCommunicator.java