private void checkTaskStatuses(List<QueryDisplay.TaskDisplay> taskDisplays) {
    assertNotNull(taskDisplays);
    for (QueryDisplay.TaskDisplay taskDisplay: taskDisplays) {
      switch (taskDisplay.taskState) {
        case INITIALIZED:
        case QUEUED:
          assertNull(taskDisplay.getExternalHandle());
          assertNull(taskDisplay.getBeginTime());
          assertNull(taskDisplay.getEndTime());
          assertNull(taskDisplay.getElapsedTime());
          assertNull(taskDisplay.getErrorMsg());
          assertNull(taskDisplay.getReturnValue());
          break;
        case RUNNING:
          assertNotNull(taskDisplay.getBeginTime());
          assertNull(taskDisplay.getEndTime());
          assertNotNull(taskDisplay.getElapsedTime());
          assertNull(taskDisplay.getErrorMsg());
          assertNull(taskDisplay.getReturnValue());
          break;
        case FINISHED:
          if (taskDisplay.getTaskType() == StageType.MAPRED || taskDisplay.getTaskType() == StageType.MAPREDLOCAL) {
            assertNotNull(taskDisplay.getExternalHandle());
            assertNotNull(taskDisplay.getStatusMessage());
          }
          assertNotNull(taskDisplay.getBeginTime());
          assertNotNull(taskDisplay.getEndTime());
          assertNotNull(taskDisplay.getElapsedTime());
          break;
        case UNKNOWN:
        default:
          fail("unknown task status: " + taskDisplay);
      }
    }
  }
Test per statement configuration overlay.
Create a table using hiveconf: var substitution, with the conf var passed
via confOverlay.Verify the confOverlay works for the query and does set the
value in the session configuration
@throws Exception
service/src/test/org/apache/hive/service/cli/CLIServiceTest.java