public void testUserService()
  {
    Token t = new Token(TOKEN_USER_READ,"","");
    //test resource owner
    User u = GoCoin.getUserService().getResourceOwner(t);
    System.out.println("[DEBUG]: Resource owner: "+u);
    boolean TEST_GET_USER = false;
    //test get user
    if (TEST_GET_USER)
    {
      u = GoCoin.getUserService().getUser(t,USER_ID);
      System.out.println("[DEBUG]: Found: "+u);
      System.out.println("[DEBUG]: \n"+u.toJSON());
    }
    boolean TEST_UPDATE = false;
    if (TEST_UPDATE)
    {
      u.setLastName("LaBella");
      t = new Token(TOKEN_USER_READ_WRITE,"","");
      //test update user
      u = GoCoin.getUserService().updateUser(t,u, null);
      System.out.println("[DEBUG]: "+u);
    }
    boolean TEST_APPS = false;
    //test the user applications
    if (TEST_APPS)
    {
      Collection<Application> apps = GoCoin.getUserService().getUserApplications(t,u);
      System.out.println("[DEBUG]: applications\n"+apps);
    }
    boolean TEST_RESET_PW = false;
    if (TEST_RESET_PW)
    {
      boolean reset = GoCoin.getUserService().resetPassword(t,u);
      System.out.println("[DEBUG]: Reset password result: ["+reset+"]");
    }
    boolean TEST_RESET_PW_WITH_TOKEN = false;
    if (TEST_RESET_PW_WITH_TOKEN)
    {
      t = new Token(TOKEN_USER_PASSWORD_WRITE,"","");
      Map<String,String> parameters = new LinkedHashMap<String,String>();
      parameters.put("reset_token",TOKEN_RESET_PASSWORD);
      parameters.put("password","passw0rd1");
      boolean reset = GoCoin.getUserService().resetPasswordWithToken(t,u,parameters);
      System.out.println("[DEBUG]: Reset password with TOKEN result: ["+reset+"]");
    }
    boolean TEST_CONFIRMATION_EMAIL = false;
    if (TEST_CONFIRMATION_EMAIL)
    {
      t = new Token(TOKEN_ALL_SCOPES,"","");
      boolean email = GoCoin.getUserService().requestConfirmationEmail(t,u);
      System.out.println("[DEBUG]: Confirmation email result: ["+email+"]");
    }
    boolean TEST_CONFIRM_USER = false;
    if (TEST_CONFIRM_USER)
    {
      t = new Token(TOKEN_ALL_SCOPES,"","");
      Map<String,String> parameters = new LinkedHashMap<String,String>();
      parameters.put("confirmation_token",TOKEN_CONFIRM_USER);
      boolean confirmed = GoCoin.getUserService().confirmUser(t,u,parameters);
      System.out.println("[DEBUG]: Confirm user result: ["+confirmed+"]");
    }
  }