public static SubmitWorkRequestProto buildSubmitProtoRequest(int fragmentNumber,
      int attemptNumber,
      String appId, int dagId, int vId, String dagName,
      int dagStartTime, int attemptStartTime, int numSelfAndUpstreamTasks, int numSelfAndUpstreamComplete,
      int withinDagPriority, Credentials credentials) throws IOException {
    return SubmitWorkRequestProto
        .newBuilder()
        .setAttemptNumber(attemptNumber)
        .setFragmentNumber(fragmentNumber)
        .setWorkSpec(
            LlapDaemonProtocolProtos.VertexOrBinary.newBuilder().setVertex(
                LlapDaemonProtocolProtos.SignableVertexSpec
                    .newBuilder()
                    .setQueryIdentifier(
                        LlapDaemonProtocolProtos.QueryIdentifierProto.newBuilder()
                            .setApplicationIdString(appId)
                            .setAppAttemptNumber(0)
                            .setDagIndex(dagId)
                            .build())
                    .setVertexIndex(vId)
                    .setDagName(dagName)
                    .setHiveQueryId(dagName)
                    .setVertexName("MockVertex")
                    .setUser("MockUser")
                    .setTokenIdentifier("MockToken_1")
                    .setProcessorDescriptor(
                        LlapDaemonProtocolProtos.EntityDescriptorProto.newBuilder()
                            .setClassName("MockProcessor").build())
                    .build()).build())
        .setAmHost("localhost")
        .setAmPort(12345)
        .setCredentialsBinary(ByteString.copyFrom(LlapTezUtils.serializeCredentials(credentials)))
        .setContainerIdString("MockContainer_1")
        .setFragmentRuntimeInfo(LlapDaemonProtocolProtos
            .FragmentRuntimeInfo
            .newBuilder()
            .setDagStartTime(dagStartTime)
            .setFirstAttemptStartTime(attemptStartTime)
            .setNumSelfAndUpstreamTasks(numSelfAndUpstreamTasks)
            .setNumSelfAndUpstreamCompletedTasks(numSelfAndUpstreamComplete)
            .setWithinDagPriority(withinDagPriority)
            .build())
        .build();
  }
Utils class for testing Llap Daemon.
llap-server/src/test/org/apache/hadoop/hive/llap/daemon/LlapDaemonTestUtils.java