package peergos.tests;

import org.junit.*;
import peergos.corenode.*;
import peergos.user.*;

import java.io.*;
import java.net.*;

public class UserTests {

    UserContext context;

    @Before
    public void setup() throws IOException {
        String username = "test01";
        String password = "test01";
        UserWithRoot userWithRoot = UserUtil.generateUser(username, password);
        DHTClient.HTTP dht = new DHTClient.HTTP(new URL("http://localhost/"));
        Btree.HTTP btree = new Btree.HTTP(new URL("http://localhost/"));
        HTTPCoreNode coreNode = new HTTPCoreNode(new URL("http://localhost"+":"+HTTPCoreNodeServer.PORT+"/"));
        context = new UserContext(username, userWithRoot.getUser(), userWithRoot.getRoot(), dht, btree, coreNode);
        context.init();
    }

    @Test
    public void signup() {

    }
}

package peergos.tests;

import org.junit.*;
import peergos.corenode.*;
import peergos.crypto.*;
import peergos.user.*;

import java.io.*;
import java.net.*;

public class UserTests {

    UserContext context;

    @Before
    public void setup() throws IOException {
        String username = "test01";
        String password = "test01";
        UserWithRoot userWithRoot = UserUtil.generateUser(username, password);
        UserPublicKey expected = UserPublicKey.fromString("7HvEWP6yd1UD8rOorfFrieJ8S7yC8+l3VisV9kXNiHmI7Eav7+3GTRSVBRCymItrzebUUoCi39M6rdgeOU9sXXFD");
        if (! expected.equals(userWithRoot.getUser().toUserPublicKey()))
            throw new IllegalStateException("Generated user diferent from the Javascript! \n"+userWithRoot.getUser().toUserPublicKey() + " != \n"+expected);
        DHTClient.HTTP dht = new DHTClient.HTTP(new URL("http://localhost/"));
        Btree.HTTP btree = new Btree.HTTP(new URL("http://localhost/"));
        HTTPCoreNode coreNode = new HTTPCoreNode(new URL("http://localhost"+":"+HTTPCoreNodeServer.PORT+"/"));
        context = new UserContext(username, userWithRoot.getUser(), userWithRoot.getRoot(), dht, btree, coreNode);
        context.init();
    }

    @Test
    public void login() {
        System.out.println();
    }
}

Test to ensure keys generated in Java using Scrypt are same as from JS