### Question:
MessageBus implements IOFogModule { public void update() throws Exception { logDebug("Start update routes, list of publishers and receivers"); synchronized (updateLock) { if (!messageBusServer.isConnected()) { messageBusServer.setConnected(false); new Thread(startServer).start(); throw new JMSException("Not connected to router"); } String tempRouterHost = routerHost; int tempRouterPort = routerPort; getRouterAddress(); if (!tempRouterHost.equals(routerHost) || tempRouterPort != routerPort) { try { stop(); } catch (Exception ex) { logError(MODULE_NAME, new AgentSystemException("unable to update router info", ex)); } finally { messageBusServer.setConnected(false); new Thread(startServer).start(); throw new JMSException("Not connected to router"); } } updatePublishersAndReceivers(); } logDebug("Finished update routes, list of publishers and receivers"); } private  MessageBus(); @Override int getModuleIndex(); @Override String getModuleName(); static MessageBus getInstance(); synchronized void enableRealTimeReceiving(String receiver); synchronized void disableRealTimeReceiving(String receiver); void update(); void instanceConfigUpdated(); void startServer(); void start(); void stop(); MessagePublisher getPublisher(String publisher); MessageReceiver getReceiver(String receiver); synchronized String getNextId(); synchronized Map<String, Route> getRoutes();  }### Answer:
@Test public void testUpdate() { initiateMockStart(); try { messageBus.update(); Mockito.verify(microserviceManager, atLeastOnce()).getLatestMicroservices(); } catch (Exception e) { fail("Shouldn't have happened"); } }