ZeppelinConfiguration extends XMLConfiguration { public List<String> getAllowedOrigins() { if (getString(ConfVars.ZEPPELIN_ALLOWED_ORIGINS).isEmpty()) { return Arrays.asList(new String[0]); } return Arrays.asList(getString(ConfVars.ZEPPELIN_ALLOWED_ORIGINS).toLowerCase().split(",")); } ZeppelinConfiguration(URL url);  ZeppelinConfiguration(); static ZeppelinConfiguration create(); String getString(ConfVars c); String getString(String envName, String propertyName, String defaultValue); int getInt(ConfVars c); int getInt(String envName, String propertyName, int defaultValue); long getLong(ConfVars c); long getLong(String envName, String propertyName, long defaultValue); float getFloat(ConfVars c); float getFloat(String envName, String propertyName, float defaultValue); boolean getBoolean(ConfVars c); boolean getBoolean(String envName, String propertyName, boolean defaultValue); boolean useSsl(); boolean useClientAuth(); String getServerAddress(); int getServerPort(); String getServerContextPath(); String getKeyStorePath(); String getKeyStoreType(); String getKeyStorePassword(); String getKeyManagerPassword(); String getTrustStorePath(); String getTrustStoreType(); String getTrustStorePassword(); String getNotebookDir(); String getUser(); String getBucketName(); String getInterpreterDir(); String getInterpreterSettingPath(); String getInterpreterRemoteRunnerPath(); String getRelativeDir(ConfVars c); String getRelativeDir(String path); boolean isWindowsPath(String path); String getConfDir(); List<String> getAllowedOrigins();  }
@Test public void getAllowedOrigins2Test() throws MalformedURLException, ConfigurationException { ZeppelinConfiguration conf = new ZeppelinConfiguration(this.getClass().getResource("/test-zeppelin-site2.xml")); List<String> origins = conf.getAllowedOrigins(); Assert.assertEquals(2, origins.size()); Assert.assertEquals("http: Assert.assertEquals("http: }
@Test public void getAllowedOrigins1Test() throws MalformedURLException, ConfigurationException { ZeppelinConfiguration conf = new ZeppelinConfiguration(this.getClass().getResource("/test-zeppelin-site1.xml")); List<String> origins = conf.getAllowedOrigins(); Assert.assertEquals(1, origins.size()); Assert.assertEquals("http: }
@Test public void getAllowedOriginsNoneTest() throws MalformedURLException, ConfigurationException { ZeppelinConfiguration conf = new ZeppelinConfiguration(this.getClass().getResource("/zeppelin-site.xml")); List<String> origins = conf.getAllowedOrigins(); Assert.assertEquals(1, origins.size()); }