AppConfigProperties { public String getPlatformUsername() { String platormUserName = getConsoleConfig().getPlatformUserName(); if ( ( platormUserName == null ) || ( platormUserName.trim().length() == 0 ) ) { platormUserName = DEFAULT_PLATFORM_USERNAME; } return platormUserName; } 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 testGetPlatformUsername() throws Exception { doReturn( consoleConfig ).when( spyAppConfigProperties ).getConsoleConfig(); when( consoleConfig.getPlatformUserName() ).thenReturn( "admin" ); assertEquals( "admin", spyAppConfigProperties.getPlatformUsername() ); }