ZeppelinConfiguration extends XMLConfiguration { public boolean isWindowsPath(String path){ return path.matches("^[A-Za-z]:\\\\.*"); } 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 isWindowsPathTestTrue() throws ConfigurationException { ZeppelinConfiguration conf = new ZeppelinConfiguration(this.getClass().getResource("/zeppelin-site.xml")); Boolean isIt = conf.isWindowsPath("c:\\test\\file.txt"); Assert.assertTrue(isIt); }
@Test public void isWindowsPathTestFalse() throws ConfigurationException { ZeppelinConfiguration conf = new ZeppelinConfiguration(this.getClass().getResource("/zeppelin-site.xml")); Boolean isIt = conf.isWindowsPath("~/test/file.xml"); Assert.assertFalse(isIt); }