Config extends AbstractConfig implements ControllerConstants, ClusterConstants { public String getProcessAndThreadPolicyScript() { if (isEmpty(policyScript)) { try { policyScript = readFileToString(getHome().getSubFile("process_and_thread_policy.js"), UTF_8); return policyScript; } catch (IOException e) { LOG.error("Error while load process_and_thread_policy.js", e); } } return policyScript; } Config(); @SuppressWarnings("UnusedDeclaration") void addSystemConfListener(PropertyChangeListener listener); @PostConstruct void init(); @PreDestroy void destroy(); boolean isClustered(); int getControllerPort(); String[] getClusterURIs(); String getRegion(); int getMonitorPort(); boolean isUsageReportEnabled(); boolean isSignUpEnabled(); synchronized void initLogger(boolean forceToVerbose); static String getCurrentLibPath(); static String getUserHome(); synchronized void loadProperties(); @SuppressWarnings("SynchronizeOnNonFinalField") void loadAnnouncement(); PropertiesWrapper getDatabaseProperties(); boolean isDevMode(); boolean isUserSecurityEnabled(); boolean isSecurityEnabled(); String getSecurityLevel(); boolean isDemo(); boolean isPluginSupported(); Home getHome(); Home getExHome(); PropertiesWrapper getControllerProperties(); String getAnnouncement(); String getVersion(); String getProcessAndThreadPolicyScript(); String getGitHubConfigTemplate(); PropertiesWrapper getInternalProperties(); boolean isVerbose(); String getCurrentIP(); boolean isInvisibleRegion(); boolean hasNoMoreTestLock(); boolean hasShutdownLock(); Date getAnnouncementDate(); String getHelpUrl(); PropertiesWrapper getClusterProperties(); PropertiesWrapper getLdapProperties(); long getInactiveClientTimeOut(); boolean isEnableStatistics(); String getCsvSeparator(); static final String NONE_REGION; }
@Test public void testPolicyFileLoad() { String processAndThreadPolicyScript = config.getProcessAndThreadPolicyScript(); assertThat(processAndThreadPolicyScript, containsString("function")); }