package gobblin.source.extractor.hadoop;

import gobblin.configuration.ConfigurationKeys;
import gobblin.configuration.SourceState;
import gobblin.source.extractor.filebased.FileBasedHelperException;

import org.apache.hadoop.conf.Configuration;
import org.testng.annotations.Test;

public class HadoopFsHelperTest {

  @Test(expectedExceptions = IllegalArgumentException.class)
  public void testConnectFailsOnS3URLWithoutAWSCredentials() throws FileBasedHelperException {
    Configuration conf = new Configuration(); // plain conf, no S3 credentials
    SourceState sourceState = new SourceState();
    HadoopFsHelper fsHelper = new HadoopFsHelper(sourceState, conf);
    sourceState.setProp(ConfigurationKeys.SOURCE_FILEBASED_FS_URI, "s3://support.elasticmapreduce/spark/install-spark/");
    fsHelper.connect();
  }
}

@@ -406,10 +406,12 @@
 ails
-On
+With
 S3UR
@@ -601,77 +601,8 @@
 ();%0A
-    HadoopFsHelper fsHelper = new HadoopFsHelper(sourceState, conf);%0A
     
@@ -719,16 +719,85 @@
 ark/%22);%0A
+    HadoopFsHelper fsHelper = new HadoopFsHelper(sourceState, conf);%0A
     fsHe

Tweak test.