package io.ipfs.api;

import java.nio.file.Path;
import java.nio.file.Paths;

import org.junit.Assert;
import org.junit.Test;

import io.ipfs.multiaddr.MultiAddress;

public class RecursiveAddTest {

    private final IPFS ipfs = new IPFS(new MultiAddress("/ip4/127.0.0.1/tcp/5001"));
    
    @Test
    public void testAdd() throws Exception {
        
        String TEST_HASH = "QmWVMRbFTrA6pMhsfXzsyoWqmrhy5FPd4VitfX79R5bguw";
        
        System.out.println("ipfs version: " + ipfs.version());
        
        Path path = Paths.get("src/test/resources/html");
        MerkleNode node = ipfs.add(new NamedStreamable.FileWrapper(path.toFile())).get(0);
        Assert.assertEquals(TEST_HASH, node.hash.toBase58());
    }
}

@@ -27,29 +27,20 @@
 rt java.
-n
 io.
-file.Path
+*
 ;%0Aimport
@@ -54,21 +54,17 @@
 io.file.
-Paths
+*
 ;%0A%0Aimpor
@@ -479,24 +479,86 @@
 version());%0A
+        System.out.println(%22pwd: %22 + new File(%22%22).getPath());%0A
         %0A   

print working directory in failing test