private void assertTaskCompleted(TaskRuntime<?> taskRuntime) {
    if (taskRuntime != null) {
      Assertions.assertEquals(TaskRuntime.Status.SUCCESS, taskRuntime.getStatus());
    }
    Assertions.assertEquals(
        ProcessStatus.RUNNING,
        tableService()
            .getRuntime(serverTableIdentifier().getId())
            .getOptimizingState()
            .getOptimizingProcess()
            .getStatus());
    Assertions.assertEquals(
        OptimizingStatus.COMMITTING,
        tableService()
            .getRuntime(serverTableIdentifier().getId())
            .getOptimizingState()
            .getOptimizingStatus());
  }
Test the logic for {@link TableManager#queryTableOptimizingInfo(String, String, String, List,
int, int)}.
amoro-ams/src/test/java/org/apache/amoro/server/TestDefaultOptimizingService.java