BackendManager implements AgentDetailsHolder { public void destroy() { try { localDispatcher.destroy(); } catch (JMException e) { error("Cannot unregister MBean: " + e,e); } } BackendManager(Configuration pConfig, LogHandler pLogHandler);  BackendManager(Configuration pConfig, LogHandler pLogHandler, Restrictor pRestrictor);  BackendManager(Configuration pConfig, LogHandler pLogHandler, Restrictor pRestrictor, boolean pLazy); JSONObject handleRequest(JmxRequest pJmxReq); Object convertExceptionToJson(Throwable pExp, JmxRequest pJmxReq); void destroy(); boolean isRemoteAccessAllowed(String pRemoteHost, String pRemoteAddr); boolean isOriginAllowed(String pOrigin,boolean pOnlyWhenStrictCheckingIsEnabled); void info(String msg); void debug(String msg); void error(String message, Throwable t); boolean isDebug(); AgentDetails getAgentDetails();  }
@Test public void defaultConfig() { Configuration config = new Configuration(ConfigKey.DEBUG_MAX_ENTRIES,"blabal",ConfigKey.AGENT_ID,"test"); BackendManager backendManager = new BackendManager(config,log); backendManager.destroy(); }
@Test public void doubleInit() { BackendManager b1 = new BackendManager(config,log); BackendManager b2 = new BackendManager(config,log); b2.destroy(); b1.destroy(); }