class NvaMonitor implements AutoCloseable {

    public synchronized Future<Void> start() throws NvaMonitorException {
        //log.debug("executorService.isShutdown(): " + executorService.isShutdown());
        //Preconditions.checkState(!executorService.isShutdown(), "Already started");
        Preconditions.checkState(!this.isRunning, "Already started");
        // We need to eventually support multiple monitors, but for now, just grab the
        // first one.
        MonitorConfiguration monitorConfiguration =
            this.configuration.getMonitors().get(0);
        Callable<Void> monitor = createMonitorCallable(monitorConfiguration);
        isRunning = true;
        Future<Void> task = executorService.submit(
            monitor
        );

        return task;
    }

}

class NvaMonitorTest {

    @Test
    void testAbstractMonitor() {

        List<MonitorConfiguration> monitors = new ArrayList<>();
        monitors.add(
            new MonitorConfiguration(
                "com.microsoft.azure.practices.nvadaemon.NvaMonitorTest$AbstractMonitor",
                null));
        DaemonConfiguration daemonConfiguration = new DaemonConfiguration(monitors, null);
        NvaMonitor nvaMonitor = new NvaMonitor(daemonConfiguration);
        Assertions.assertThrows(NvaMonitor.NvaMonitorException.class,
            () -> nvaMonitor.start());
    }

}