### Question:
AbstractServer implements Configurable { public void shutdown(int exitCode) { this.exitCode = exitCode; LOG.debug("Initiating shutdown"); stop(); } protected  AbstractServer(String serverName); @Override void setConf(Configuration conf); @Override Configuration getConf(); synchronized void start(); void shutdown(int exitCode); int getExitCode(); void stop(); abstract String getAddressHost(); abstract int getAddressPort(); String getAdminAddressHost(); int getAdminAddressPort();  }### Answer:
@Test public void testShutdown() throws Exception { final MyServer server = new MyServer(); Configuration conf = new Configuration(false); server.setConf(conf); server.start(); server.shutdown(1); Assert.assertEquals(1, server.getExitCode()); }