### Question:
MessageBusServer { void startServer(String routerHost, int routerPort) throws Exception { LoggingService.logDebug(MODULE_NAME, "Starting server"); JmsConnectionFactory connectionFactory = new JmsConnectionFactory(String.format("amqp: connection = connectionFactory.createConnection(); LoggingService.logDebug(MODULE_NAME, "Finished starting server"); }  boolean isConnected(); void setConnected(boolean connected); static final Object messageBusSessionLock; static final Object consumerLock; static final Object producerLock; }### Answer:
@Test public void testStartServer() { try { messageBusServer.startServer("localhost", 5672); Mockito.verify(connectionFactory, Mockito.atLeastOnce()).createConnection(); PowerMockito.verifyStatic(LoggingService.class, atLeastOnce()); LoggingService.logDebug(MODULE_NAME, "Starting server"); PowerMockito.verifyStatic(LoggingService.class, atLeastOnce()); LoggingService.logDebug(MODULE_NAME, "Finished starting server"); } catch (Exception e) { fail("This should not happen"); } }