@Override
    public boolean isInitializedAndRunning() {
        synchronized (lock) {
            return jobMasterServiceFuture.isDone()
                    && !jobMasterServiceFuture.isCompletedExceptionally()
                    && isRunning;
        }
    }
@Test
    void testIsInitialized() {
        final CompletableFuture<JobMasterService> jobMasterServiceFuture =
                new CompletableFuture<>();
        DefaultJobMasterServiceProcess serviceProcess = createTestInstance(jobMasterServiceFuture);

        jobMasterServiceFuture.complete(new TestingJobMasterService());

        assertThat(serviceProcess.isInitializedAndRunning()).isTrue();
    }