AppConfigProperties { public String getBiServerBaseUrl() { String baseUrl = DEFAULT_BISERVER_BASE_URL; String consoleXmlBaseUrl = getConsoleConfig().getBaseUrl(); if ( consoleXmlBaseUrl != null ) { return consoleXmlBaseUrl; } try { WebXml webXml = new WebXml( new File( getWarPath() + WEB_XML_PATH ) ); baseUrl = webXml.getBaseUrl(); if ( !( baseUrl != null && baseUrl.length() > 0 ) ) { baseUrl = DEFAULT_BISERVER_BASE_URL; } } catch ( Exception e ) { } return baseUrl; } protected  AppConfigProperties(); static synchronized AppConfigProperties getInstance(); void refreshConfig(); boolean isValidConfiguration(); PasswordEncoder getPasswordEncoder(); String getPlatformUsername(); String getBiServerContextPath(); String getBiServerBaseUrl(); String getBiServerStatusCheckPeriod(); String getDefaultRolesString(); List<String> getDefaultRoles(); String getHomepageUrl(); String getHomepageTimeout(); String getHibernateConfigPath(); boolean isHibernateManaged(); String getSolutionPath(); String getWarPath(); String getPasswordServiceClass(); String getJdbcDriverPath(); String getHelpUrl(); static final String CONFIG_FILE_NAME; static final String WEB_XML_PATH; static final String HIBERNATE_MANAGED_XML_PATH; static final String PENTAHO_OBJECTS_SPRING_XML; static final String SPRING_SECURITY_HIBERNATE_XML; static final String JDBC_DRIVER_PATH; static final String KEY_BISERVER_STATUS_CHECK_PERIOD; static final String KEY_BISERVER_BASE_URL; static final String KEY_BISERVER_CONTEXT_PATH; static final String KEY_PLATFORM_USERNAME; static final String DEFAULT_VALUE_PASSWORD_SERVICE_CLASS; static final String DEFAULT_BISERVER_BASE_URL; static final String DEFAULT_BISERVER_CONTEXT_PATH; static final String DEFAULT_PLATFORM_USERNAME; static final String DEFAULT_BISERVER_STATUS_CHECK_PERIOD; static final String DEFAULT_HOMEPAGE_TIMEOUT; static final String DEFAULT_HIBERNATE_CONFIG_PATH; static final String DEFAULT_HELP_URL; static final String DEFAULT_HOMEPAGE_URL; }
@Test public void testGetBiServerBaseUrl() throws Exception { doReturn( consoleConfig ).when( spyAppConfigProperties ).getConsoleConfig(); when( consoleConfig.getBaseUrl() ).thenReturn( "http: assertEquals( "http: }