@Override
    protected TezTaskAttemptID getTaskAttemptId(Object task) {
      if (task instanceof TezTaskAttemptID) {
        return (TezTaskAttemptID)task;
      }
      return null;
    }
Note: this only works for testing the lack of invocations from the main thread.
llap-tez/src/test/org/apache/hadoop/hive/llap/tezplugins/TestLlapTaskSchedulerService.java