### Question:
SparkConfigurationReaderInterceptor extends DefaultConfigurationReaderInterceptor { @Override public Resource createResource(String resourceUrl, final DataCleanerConfiguration tempConfiguration) { final Matcher matcher = HadoopResourceBuilder.RESOURCE_SCHEME_PATTERN.matcher(resourceUrl); if (matcher.find()) { resourceUrl = matcher.group(1) + ": } final URI uri = URI.create(resourceUrl); return _hdfsHelper.getResourceToUse(uri); } SparkConfigurationReaderInterceptor(final Map<String, String> customProperties); @Override Resource createResource(String resourceUrl, final DataCleanerConfiguration tempConfiguration);  }### Answer:
@Test public void testRemoveServerFromHdfsUrl() throws Exception { final SparkConfigurationReaderInterceptor interceptor = new SparkConfigurationReaderInterceptor(new HashMap<>()); final Resource resource = interceptor .createResource("hdfs: new DataCleanerConfigurationImpl()); assertTrue("Found: " + resource.getClass().getName(), resource instanceof HadoopResource); assertEquals("hdfs: }
@Test public void testSimpleHdfsUrl() throws Exception { final SparkConfigurationReaderInterceptor interceptor = new SparkConfigurationReaderInterceptor(new HashMap<>()); final Resource resource = interceptor .createResource("hdfs: assertTrue("Found: " + resource.getClass().getName(), resource instanceof HadoopResource); assertEquals("hdfs: }
@Test public void testSimpleSchemeLessUrl() throws Exception { final SparkConfigurationReaderInterceptor interceptor = new SparkConfigurationReaderInterceptor(new HashMap<>()); final Resource resource = interceptor.createResource("/datacleaner/data/companies_3.csv", new DataCleanerConfigurationImpl()); assertTrue("Found: " + resource.getClass().getName(), resource instanceof HadoopResource); assertEquals("hdfs: }