Server { @SuppressWarnings("unchecked") public <T> T get(Class<T> serviceKlass) { ensureOperational(); Check.notNull(serviceKlass, "serviceKlass"); return (T) services.get(serviceKlass); } Server(String name, String homeDir);  Server(String name, String homeDir, String configDir, String logDir,
      String tempDir);  Server(String name, String homeDir, Configuration config);  Server(String name, String homeDir, String configDir, String logDir,
      String tempDir, Configuration config); Status getStatus(); void setStatus(Status status); void init(); void destroy(); String getName(); String getPrefix(); String getPrefixedName(String name); String getHomeDir(); String getConfigDir(); String getLogDir(); String getTempDir(); Configuration getConfig(); @SuppressWarnings("unchecked") T get(Class<T> serviceKlass); void setService(Class<? extends Service> klass); static final String CONF_SERVICES; static final String CONF_SERVICES_EXT; static final String CONF_STARTUP_STATUS; static final String DEFAULT_LOG4J_PROPERTIES; }
@Test(expected = IllegalStateException.class) @TestDir public void illegalState2() throws Exception { Server server = new Server("server", TestDirHelper.getTestDir().getAbsolutePath(), new Configuration(false)); server.get(Object.class); }