@Override
    public HealthCheckResponse call() {
        final HealthCheckResponseBuilder healthResponseBuilder = HealthCheckResponse.named("JobRunr");
        if (!jobRunrBuildTimeConfiguration.backgroundJobServer().enabled()) {
            healthResponseBuilder
                    .up()
                    .withData("backgroundJobServer", "disabled");
        } else {
            final BackgroundJobServer backgroundJobServer = backgroundJobServerInstance.get();
            if (backgroundJobServer.isRunning()) {
                healthResponseBuilder
                        .up()
                        .withData("backgroundJobServer", "enabled")
                        .withData("backgroundJobServerStatus", "running");
            } else {
                healthResponseBuilder
                        .down()
                        .withData("backgroundJobServer", "enabled")
                        .withData("backgroundJobServerStatus", "stopped");
            }
        }
        return healthResponseBuilder.build();
    }
@Test
    void givenEnabledBackgroundJobServerAndBackgroundJobServerStopped_ThenHealthIsDown() {
        when(backgroundJobServerConfiguration.enabled()).thenReturn(true);
        when(backgroundJobServer.isRunning()).thenReturn(false);

        assertThat(jobRunrHealthCheck.call().getStatus()).isEqualTo(HealthCheckResponse.Status.DOWN);
    }