public long getSignature() {
        return this.signature;
    }
@Test
    public void toThriftTest() throws Exception {
        Class<? extends AgentBatchTask> agentBatchTaskClass = agentBatchTask.getClass();
        Class[] typeParams = new Class[] {AgentTask.class};
        Method toAgentTaskRequest = agentBatchTaskClass.getDeclaredMethod("toAgentTaskRequest", typeParams);
        toAgentTaskRequest.setAccessible(true);

        // create
        TAgentTaskRequest request = (TAgentTaskRequest) toAgentTaskRequest.invoke(agentBatchTask, createReplicaTask);
        Assert.assertEquals(TTaskType.CREATE, request.getTask_type());
        Assert.assertEquals(createReplicaTask.getSignature(), request.getSignature());
        Assert.assertNotNull(request.getCreate_tablet_req());

        // drop
        TAgentTaskRequest request2 = (TAgentTaskRequest) toAgentTaskRequest.invoke(agentBatchTask, dropTask);
        Assert.assertEquals(TTaskType.DROP, request2.getTask_type());
        Assert.assertEquals(dropTask.getSignature(), request2.getSignature());
        Assert.assertNotNull(request2.getDrop_tablet_req());

        // clone
        TAgentTaskRequest request4 = (TAgentTaskRequest) toAgentTaskRequest.invoke(agentBatchTask, cloneTask);
        Assert.assertEquals(TTaskType.CLONE, request4.getTask_type());
        Assert.assertEquals(cloneTask.getSignature(), request4.getSignature());
        Assert.assertNotNull(request4.getClone_req());

        // modify enable_persistent_index
        TAgentTaskRequest request7 =
                (TAgentTaskRequest) toAgentTaskRequest.invoke(agentBatchTask, modifyEnablePersistentIndexTask1);
        Assert.assertEquals(TTaskType.UPDATE_TABLET_META_INFO, request7.getTask_type());
        Assert.assertEquals(modifyEnablePersistentIndexTask1.getSignature(), request7.getSignature());
        Assert.assertNotNull(request7.getUpdate_tablet_meta_info_req());

        TAgentTaskRequest request8 =
                (TAgentTaskRequest) toAgentTaskRequest.invoke(agentBatchTask, modifyEnablePersistentIndexTask2);
        Assert.assertEquals(TTaskType.UPDATE_TABLET_META_INFO, request8.getTask_type());
        Assert.assertEquals(modifyEnablePersistentIndexTask2.getSignature(), request8.getSignature());
        Assert.assertNotNull(request8.getUpdate_tablet_meta_info_req());

        // modify in_memory
        TAgentTaskRequest request9 = (TAgentTaskRequest) toAgentTaskRequest.invoke(agentBatchTask, modifyInMemoryTask);
        Assert.assertEquals(TTaskType.UPDATE_TABLET_META_INFO, request9.getTask_type());
        Assert.assertEquals(modifyInMemoryTask.getSignature(), request9.getSignature());
        Assert.assertNotNull(request9.getUpdate_tablet_meta_info_req());

        // modify primary index cache
        TAgentTaskRequest request10 = (TAgentTaskRequest) toAgentTaskRequest.invoke(agentBatchTask,
                modifyPrimaryIndexCacheExpireSecTask1);
        Assert.assertEquals(TTaskType.UPDATE_TABLET_META_INFO, request10.getTask_type());
        Assert.assertEquals(modifyPrimaryIndexCacheExpireSecTask1.getSignature(), request10.getSignature());
        Assert.assertNotNull(request10.getUpdate_tablet_meta_info_req());

        TAgentTaskRequest request11 = (TAgentTaskRequest) toAgentTaskRequest.invoke(agentBatchTask,
                modifyPrimaryIndexCacheExpireSecTask2);
        Assert.assertEquals(TTaskType.UPDATE_TABLET_META_INFO, request11.getTask_type());
        Assert.assertEquals(modifyPrimaryIndexCacheExpireSecTask2.getSignature(), request11.getSignature());
        Assert.assertNotNull(request11.getUpdate_tablet_meta_info_req());
    }