### Question:
SparkUtil { @Nonnull public static URL parseUrl(@Nonnull final String s) { final URI uri = URI.create(s); if (uri.getScheme() == null || "local".equals(uri.getScheme())) { try { return new URL("file:" + uri.getSchemeSpecificPart()); } catch (final MalformedURLException e) { throw new IllegalArgumentException(); } } else { return FileSystemUtil.parseUrl(s, null); } } private  SparkUtil(); @Contract("_, null -> _; _, !null -> !null") @Nullable static T getOrElse(@Nullable final Option<T> option, @Nullable final T defaultValue); @Nonnull static URL parseUrl(@Nonnull final String s); @Nonnull static DataFrameReader prepareDataFrameReader(@Nonnull final DataFrameReader reader, @Nonnull final DataSetOptions options, @Nullable final KyloCatalogClient client); @Nonnull static DataFrameWriter prepareDataFrameWriter(@Nonnull final DataFrameWriter writer, @Nonnull final DataSetOptions options, @Nullable final KyloCatalogClient client); static String resolveDataSource(@Nonnull final DataSetOptions options, @Nullable final KyloCatalogClient client); @Nonnull static SaveMode toSaveMode(final String s);  }### Answer:
@Test public void parseUrl() throws MalformedURLException { Handler.register(); Assert.assertEquals(new URL("file:/path/file.ext"), SparkUtil.parseUrl("/path/file.ext")); Assert.assertEquals(new URL("file:/path/file.ext"), SparkUtil.parseUrl("file:/path/file.ext")); Assert.assertEquals(new URL("file:/path/file.ext"), SparkUtil.parseUrl("local:/path/file.ext")); Assert.assertEquals(new URL("hadoop:hdfs: }