### Question:
AutoRecoveryMain { public void shutdown() { shutdown(ExitCode.OK); } AutoRecoveryMain(ServerConfiguration conf);  AutoRecoveryMain(ServerConfiguration conf, StatsLogger statsLogger); void start(); void join(); void shutdown(); void setExceptionHandler(UncaughtExceptionHandler exceptionHandler); @VisibleForTesting Auditor getAuditor(); boolean isAutoRecoveryRunning(); static void main(String[] args); static LifecycleComponentStack buildAutoRecoveryServer(BookieConfiguration conf);  }### Answer:
@Test public void testShutdown() throws Exception { AutoRecoveryMain main = new AutoRecoveryMain(bsConfs.get(0)); main.start(); Thread.sleep(500); assertTrue("AuditorElector should be running", main.auditorElector.isRunning()); assertTrue("Replication worker should be running", main.replicationWorker.isRunning()); main.shutdown(); assertFalse("AuditorElector should not be running", main.auditorElector.isRunning()); assertFalse("Replication worker should not be running", main.replicationWorker.isRunning()); }