package org.embulk.input;

import com.google.common.base.Optional;
import org.embulk.EmbulkTestRuntime;
import org.embulk.config.ConfigSource;
import org.embulk.spi.Exec;
import org.junit.Rule;
import org.junit.Test;

import java.util.Collections;

import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;

public class TestRemoteFileInputPlugin
{
    @Rule
    public EmbulkTestRuntime runtime = new EmbulkTestRuntime();

    @Test
    public void checkDefaultValues()
    {
        ConfigSource config = Exec.newConfigSource();

        RemoteFileInputPlugin.PluginTask task = config.loadConfig(RemoteFileInputPlugin.PluginTask.class);
		assertThat(task.getHosts(), is(Collections.<String>emptyList()));
		assertThat(task.getHostsCommand(), is(Optional.<String>absent()));
		assertThat(task.getHostsSeparator(), is(" "));
		assertThat(task.getPath(), is(""));
		assertThat(task.getPathCommand(), is(Optional.<String>absent()));
		assertThat(task.getAuth(), is(Collections.<String, String>emptyMap()));
		assertThat(task.getLastTarget(), is(Optional.<RemoteFileInputPlugin.Target>absent()));
    }
}

@@ -16,24 +16,26 @@
 ulk.input;%0A%0A
+//
 import com.g
@@ -62,16 +62,18 @@
 tional;%0A
+//
 import o
@@ -101,16 +101,18 @@
 untime;%0A
+//
 import o
@@ -142,16 +142,18 @@
 Source;%0A
+//
 import o
@@ -172,16 +172,18 @@
 i.Exec;%0A
+//
 import o
@@ -197,16 +197,18 @@
 t.Rule;%0A
+//
 import o
@@ -222,17 +222,21 @@
 t.Test;%0A
-%0A
+//%0A//
 import j
@@ -257,17 +257,21 @@
 ctions;%0A
-%0A
+//%0A//
 import s
@@ -306,16 +306,18 @@
 ers.is;%0A
+//
 import s
@@ -393,16 +393,18 @@
 lugin%0A%7B%0A
+//
     @Rul
@@ -405,16 +405,18 @@
   @Rule%0A
+//
     publ
@@ -467,25 +467,29 @@
 tRuntime();%0A
-%0A
+//%0A//
     @Test%0A  
@@ -486,16 +486,18 @@
   @Test%0A
+//
     publ
@@ -529,14 +529,18 @@
 s()%0A
+//
     %7B%0A
+//
     
@@ -589,17 +589,21 @@
 urce();%0A
-%0A
+//%0A//
         
@@ -701,16 +701,18 @@
 class);%0A
+//
 %09%09assert
@@ -767,24 +767,26 @@
 tyList()));%0A
+//
 %09%09assertThat
@@ -834,32 +834,34 @@
 ing%3Eabsent()));%0A
+//
 %09%09assertThat(tas
@@ -889,24 +889,26 @@
 , is(%22 %22));%0A
+//
 %09%09assertThat
@@ -929,24 +929,26 @@
 ), is(%22%22));%0A
+//
 %09%09assertThat
@@ -999,24 +999,26 @@
 absent()));%0A
+//
 %09%09assertThat
@@ -1079,16 +1079,18 @@
 ap()));%0A
+//
 %09%09assert
@@ -1170,16 +1170,18 @@
 nt()));%0A
+//
     %7D%0A%7D%0A

Comment out test. (Can't compile)