BackendManagerImpl implements BackendManager { @Override public Settings getSettings() { return new Settings(configurationManager.getParameter(UPNP_SERVER_NAME)); } @Inject  BackendManagerImpl(final ConfigurationManager configurationManager, final EventBus eventBus); @Override Collection<ConfigurationFolder> getFolders(final RootNode rootNode); @Override ConfigurationFolder getFolder(final String id, final RootNode rootNode); @Override void addFolder(final ConfigurationFolder folder, final RootNode rootNode); @Override void editFolder(final String id, final ConfigurationFolder folder, final RootNode rootNode); @Override void removeFolder(final String id, final RootNode rootNode); @Override Settings getSettings(); @Override void saveSettings(final Settings settings);  }
@Test public void testGetSettings() { ConfigurationManager configurationManager = createMock(ConfigurationManager.class); EventBus eventBus = createMock(EventBus.class); expect(configurationManager.getParameter(UPNP_SERVER_NAME)).andReturn("serverName"); replay(configurationManager, eventBus); try { BackendManagerImpl backendManager = new BackendManagerImpl(configurationManager, eventBus); Settings settings = backendManager.getSettings(); assertNotNull(settings); } finally { verify(configurationManager, eventBus); } }