public void start() {
        if (!enabled) {
            logger.info(format("Diagnostics disabled. To enable add -D%s=true to the JVM arguments.", ENABLED.getName()));
            return;
        }

        this.diagnosticsLog = outputType.newLog(this);
        this.scheduler = new ScheduledThreadPoolExecutor(1, new DiagnosticSchedulerThreadFactory());

        logger.info("Diagnostics started");
    }
@Test
    public void start_whenEnabled() throws Exception {
        Diagnostics diagnostics = newDiagnostics(new Config().setProperty(Diagnostics.ENABLED.getName(), "true"));
        diagnostics.start();

        assertNotNull("DiagnosticsLogFile should not be null", diagnostics.diagnosticsLog);
    }