Deployer { public synchronized void startController() { if (started) { log.error( "Method startController() should only be called once per VM process. Use softRestart() " + "for hot-deploying new controller state." ); return; } if (controllerConfig.getBeehiveSyncing()) { controllerAnnouncement = new ControllerAnnouncement(this); controllerAnnouncement.start(); discoveredDevicesAnnouncement = new DiscoveredDevicesAnnouncement(this); discoveredDevicesAnnouncement.start(); } try { startup(); } catch (ControllerDefinitionNotFoundException e) { log.info( "\n\n" + "********************************************************************************\n" + "\n" + " Controller definition was not found in this OpenRemote Controller instance. \n" + "\n" + " If you are starting the controller for the first time, please use your web \n" + " browser to connect to the controller home page and synchronize it with your \n" + " online account. \n" + "\n" + "********************************************************************************\n\n" + "\n" + e.getMessage() ); } catch (Throwable t) { log.error("!!! CONTROLLER STARTUP FAILED : {0} !!!", t, t.getMessage()); } controllerDefinitionWatch.start(); started = true; } Deployer(String serviceName, StatusCache deviceStateCache,
                  ControllerConfiguration controllerConfig,
                  Map<String, ModelBuilder> builders); synchronized void startController(); boolean isPaused(); void softRestart(); void deployFromZip(InputStream inputStream); void deployFromOnline(String username, String credentials); Element queryElementById(int id); Map<String, String> getConfigurationProperties(); Sensor getSensorFromComponentInclude(Element componentIncludeElement); void announceDiscoveredDevices(List<DiscoveredDeviceDTO> list); String getLinkedAccountId(); void unlinkController();  }
@Test public void testStartControllerConsequtiveCalls() throws Exception { Deployer d = createDeployer("Test start controller"); d.startController(); d.startController(); }