AppConfigProperties { public List<String> getDefaultRoles() { String defaultRolesString = getDefaultRolesString(); List<String> defaultRoles = new ArrayList<>(); if ( ( defaultRolesString != null ) && ( defaultRolesString.trim().length() > 0 ) ) { StringTokenizer tokenizer = new StringTokenizer( defaultRolesString, "," ); while ( tokenizer.hasMoreTokens() ) { defaultRoles.add( tokenizer.nextToken() ); } } return defaultRoles; } 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 testGetDefaultRoles() throws Exception { doReturn( "Authenticated,Contributor" ).when( spyAppConfigProperties ).getDefaultRolesString(); List<String> defaultRoles = spyAppConfigProperties.getDefaultRoles(); assertEquals( 2, defaultRoles.size() ); assertEquals( "Authenticated", defaultRoles.get( 0 ) ); assertEquals( "Contributor", defaultRoles.get( 1 ) ); }