Could not get a result from TaskQuery after start a process instance in a custom command

Hi, everyone:
I had got some problems when I tried to use ManagementService#executeCommand().
Here is my process, just a simple process with one UserTask :

<process id="holidayRequest" name="Holiday Request" isExecutable="true">

    <startEvent id="startEvent"/>
    <sequenceFlow sourceRef="startEvent" targetRef="firstTask"/>
    <userTask id="firstTask" name="First"/>
    <sequenceFlow sourceRef="firstTask" targetRef="endEvent"/>
    <endEvent id="endEvent"/>

</process>

and my test cases are:

@SpringBootTest(classes = ExampleApplication.class)
class ExampleApplicationTests {

    @Autowired
    private RuntimeService runtimeService;
    @Autowired
    private TaskService taskService;
    @Autowired
    private ManagementService managementService;

    @Test
    @FormDeploymentAnnotation
    public void test() {
        ProcessInstance processInstance 
                = runtimeService.startProcessInstanceByKey("holidayRequest");

        Task firstTask = taskService.createTaskQuery()
                                    .processInstanceId(processInstance.getId())
                                    .singleResult();
        
        taskService.complete(firstTask.getId());

        assertNotNull(firstTask);
        assertEquals("firstTask", firstTask.getTaskDefinitionKey());

    }

    @Test
    @FormDeploymentAnnotation
    public void test2() {
        managementService.executeCommand(commandContext -> {
            RuntimeService runtimeService = CommandContextUtil
                    .getProcessEngineConfiguration(commandContext)
                    .getRuntimeService();
            TaskService taskService = CommandContextUtil
                    .getProcessEngineConfiguration(commandContext)
                    .getTaskService();

            ProcessInstance processInstance 
                    = runtimeService.startProcessInstanceByKey("holidayRequest");

            Task firstTask = taskService.createTaskQuery()
                                        .processInstanceId(processInstance.getId())
                                        .singleResult();

            assertNotNull(firstTask);
            assertEquals("firstTask", firstTask.getTaskDefinitionKey());

            return null;
        });
    }
}

The method test1() was passed.
The method test2() was failed with a NullPointerException because firstTask was null.

What I want is to do the same things like test1(), but in a Command.
How am I surpose to do ?

Flowable version:

<dependency>
   <groupId>org.flowable</groupId>
   <artifactId>flowable-spring-boot-starter</artifactId>
   <version>6.6.0</version>
</dependency>

Database:
MySQL 8.0.22 running in docker

docker run -p 3306:3306 --name mysql -e MYSQL_ROOT_PASSWORD=mysql -d mysql --lower_case_table_names=1

Thanks!