anchor.diff:  	 * @throws AuthenticationException
   	 *             the authentication exception
   	 */
  +	
   	public void function testSetCurrentUser() {
   		newJava("java.lang.System").out.println("setCurrentUser");
  -        local.authenticator = instance.ESAPI.authenticator();
  +		local.authenticator = instance.ESAPI.authenticator();
   		local.user1 = instance.ESAPI.randomizer().getRandomString(8, newJava("org.owasp.esapi.reference.DefaultEncoder").CHAR_UPPERS);
   		local.user2 = instance.ESAPI.randomizer().getRandomString(8, newJava("org.owasp.esapi.reference.DefaultEncoder").CHAR_UPPERS);
   		local.userOne = local.authenticator.createUser(local.user1, "getCurrentUser", "getCurrentUser");
   		local.userOne.enable();
  -	    local.request = new cfesapi.test.org.owasp.esapi.http.MockHttpServletRequest();
  +		local.request = new cfesapi.test.org.owasp.esapi.http.MockHttpServletRequest();
   		local.response = new cfesapi.test.org.owasp.esapi.http.MockHttpServletResponse();
   		instance.ESAPI.httpUtilities().setCurrentHTTP(local.request, local.response);
   		local.userOne.loginWithPassword(password="getCurrentUser");
   		local.currentUser = local.authenticator.getCurrentUser();
  -		assertEquals( local.currentUser, local.userOne );
  -		local.userTwo = local.authenticator.createUser(local.user2, "getCurrentUser", "getCurrentUser");		
  -		local.authenticator.setCurrentUser( local.userTwo );
  -		assertFalse( local.currentUser.getAccountName() == local.userTwo.getAccountName() );
  -		
  +		assertEquals(local.currentUser, local.userOne);
  +		local.userTwo = local.authenticator.createUser(local.user2, "getCurrentUser", "getCurrentUser");
  +		local.authenticator.setCurrentUser(local.userTwo);
  +		assertFalse(local.currentUser.getAccountName() == local.userTwo.getAccountName());
  +	
   		/* TODO: make this work too!
   		Runnable echo = new Runnable() {
  -			private int count = 1;
  -			public void run() {
  -				User u=null;
  -				try {
  -					local.password = instance.ESAPI.randomizer().getRandomString(8, newJava("org.owasp.esapi.reference.DefaultEncoder").CHAR_ALPHANUMERICS);
  -					u = local.authenticator.createUser("test" & count++, local.password, local.password);
  -					local.authenticator.setCurrentUser(u);
  -					instance.ESAPI.getLogger("test").info( Logger.SECURITY_SUCCESS, "Got current user" );
  -					// instance.ESAPI.authenticator().removeUser( u.getAccountName() );
  -				} catch (cfesapi.org.owasp.esapi.errors.AuthenticationException e) {
  -					e.printStackTrace();
  -				}
  -			}
  +		    private int count = 1;
  +		    public void run() {
  +		        User u=null;
  +		        try {
  +		            local.password = instance.ESAPI.randomizer().getRandomString(8, newJava("org.owasp.esapi.reference.DefaultEncoder").CHAR_ALPHANUMERICS);
  +		            u = local.authenticator.createUser("test" & count++, local.password, local.password);
  +		            local.authenticator.setCurrentUser(u);
  +		            instance.ESAPI.getLogger("test").info( Logger.SECURITY_SUCCESS, "Got current user" );
  +		            // instance.ESAPI.authenticator().removeUser( u.getAccountName() );
  +		        } catch (cfesapi.org.owasp.esapi.errors.AuthenticationException e) {
  +		            e.printStackTrace();
  +		        }
  +		    }
   		};
   		for ( int i = 0; i<10; i++ ) {
  -			new Thread( echo ).start();
  +		    new Thread( echo ).start();
   		}*/
   	}
   	
  -
   	/**
   	 * Test of setCurrentUser method, of class org.owasp.esapi.Authenticator.
   	 * 
   	 * @throws AuthenticationException
   	 *             the authentication exception
   	 */
  +	
   	public void function testSetCurrentUserWithRequest() {
   		newJava("java.lang.System").out.println("setCurrentUser(req,resp)");
  -        local.authenticator = instance.ESAPI.authenticator();
  -        local.authenticator.logout();  // in case anyone is logged in
  +		local.authenticator = instance.ESAPI.authenticator();
  +		local.authenticator.logout();// in case anyone is logged in
   		local.password = local.authenticator.generateStrongPassword();
   		local.accountName = instance.ESAPI.randomizer().getRandomString(8, newJava("org.owasp.esapi.reference.DefaultEncoder").CHAR_ALPHANUMERICS);
   		local.user = local.authenticator.createUser(local.accountName, local.password, local.password);
  
positive.code: 	 * @throws AuthenticationException
  	 *             the authentication exception
  	 */
  	public void function testValidatePasswordStrength() {
  		newJava("java.lang.System").out.println("validatePasswordStrength");
          local.authenticator = instance.ESAPI.authenticator();
          
          local.username = "FictionalEsapiUser";
  		local.user = new cfesapi.org.owasp.esapi.reference.DefaultUser(instance.ESAPI, local.username);
  
  		// should fail
  		try {
  			local.authenticator.verifyPasswordStrength("password", "jeff", local.user);
  			fail();
  		} catch (cfesapi.org.owasp.esapi.errors.AuthenticationCredentialsException e) {
  			// success
  		}
  		try {
  			local.authenticator.verifyPasswordStrength("diff123bang", "same123string", local.user);
  			fail();
  		} catch (cfesapi.org.owasp.esapi.errors.AuthenticationCredentialsException e) {
  			// success
  		}
  		try {
  			local.authenticator.verifyPasswordStrength("password", "JEFF", local.user);
  			fail();
  		} catch (cfesapi.org.owasp.esapi.errors.AuthenticationCredentialsException e) {
  			// success
  		}
  		try {
  			local.authenticator.verifyPasswordStrength("password", "1234", local.user);
  			fail();
  		} catch (cfesapi.org.owasp.esapi.errors.AuthenticationCredentialsException e) {
  			// success
  		}
  		try {
  			local.authenticator.verifyPasswordStrength("password", "password", local.user);
  			fail();
  		} catch (cfesapi.org.owasp.esapi.errors.AuthenticationCredentialsException e) {
  			// success
  		}
  		try {
  			local.authenticator.verifyPasswordStrength("password", "-1", local.user);
  			fail();
  		} catch (cfesapi.org.owasp.esapi.errors.AuthenticationCredentialsException e) {
  			// success
  		}
  		try {
  			local.authenticator.verifyPasswordStrength("password", "password123", local.user);
  			fail();
  		} catch (cfesapi.org.owasp.esapi.errors.AuthenticationCredentialsException e) {
  			// success
  		}
  		try {
  			local.authenticator.verifyPasswordStrength("password", "test123", local.user);
  			fail();
  		} catch (cfesapi.org.owasp.esapi.errors.AuthenticationCredentialsException e) {
  			// success
  		}
  		//jtm - 11/16/2010 - fix for bug http://code.google.com/p/owasp-esapi-java/issues/detail?id=108
  		try {
  			local.authenticator.verifyPasswordStrength("password", "FictionalEsapiUser", local.user);
  			fail();
  		} catch (cfesapi.org.owasp.esapi.errors.AuthenticationCredentialsException e) {
  			// success
  		}
  		try {
  			local.authenticator.verifyPasswordStrength("password", "FICTIONALESAPIUSER", local.user);
  			fail();
  		} catch (cfesapi.org.owasp.esapi.errors.AuthenticationCredentialsException e) {
  			// success
  		}
  
  		// should pass
  		local.authenticator.verifyPasswordStrength("password", "jeffJEFF12!", local.user);
  		local.authenticator.verifyPasswordStrength("password", "super calif ragil istic", local.user);
  		local.authenticator.verifyPasswordStrength("password", "TONYTONYTONYTONY", local.user);
  		local.authenticator.verifyPasswordStrength("password", local.authenticator.generateStrongPassword(), local.user);
  
          // chrisisbeef - Issue 65 - http://code.google.com/p/owasp-esapi-java/issues/detail?id=65
          local.authenticator.verifyPasswordStrength("password", "b!gbr0ther", local.user);
  	}
  
  	/**
  	 * Test of exists method, of class org.owasp.esapi.Authenticator.
  	 * 
  	 * @throws Exception
  	 *             the exception
  	 */
  	public void function testExists() {
  		newJava("java.lang.System").out.println("exists");
  		local.accountName = instance.ESAPI.randomizer().getRandomString(8, newJava("org.owasp.esapi.reference.DefaultEncoder").CHAR_ALPHANUMERICS);
          local.authenticator = instance.ESAPI.authenticator();
  		local.password = local.authenticator.generateStrongPassword();
  		local.authenticator.createUser(local.accountName, local.password, local.password);
  		assertTrue(local.authenticator.exists(local.accountName));
  		local.authenticator.removeUser(local.accountName);
  		assertFalse(local.authenticator.exists(local.accountName));
  	}
  
      /**
       * Test of main method, of class org.owasp.esapi.Authenticator.
       * @throws Exception
       */
      /* NOTE: do we need this test?
      public void function testMain() {
          newJava("java.lang.System").out.println("Authenticator Main");
          local.authenticator = instance.ESAPI.authenticator();
          local.accountName = instance.ESAPI.randomizer().getRandomString(8, newJava("org.owasp.esapi.reference.DefaultEncoder").CHAR_ALPHANUMERICS);
          local.password = local.authenticator.generateStrongPassword();
          local.role = "test";
          
          // test wrong parameters - missing role parameter
          local.badargs = [ local.accountName, local.password ];
          FileBasedAuthenticator.main( local.badargs );
          // load users since the new user was added in another instance
          local.authenticator.loadUsersImmediately();
          local.u1 = local.authenticator.getUser(local.accountName);
          assertNull( local.u1 );
  
          // test good parameters
          local.args = [ local.accountName, local.password, local.role ];
          FileBasedAuthenticator.main(local.args);
          // load users since the new user was added in another instance
          local.authenticator.loadUsersImmediately();
          local.u2 = local.authenticator.getUser(local.accountName);
          assertNotNull( local.u2 );
          assertTrue( local.u2.isInRole(local.role));
          assertEquals( local.authenticator.hashPassword(local.password, local.accountName), local.authenticator.getHashedPassword(local.u2) );
      } */
      
      
  }
  
negative.code: 		local.password = local.authenticator.generateStrongPassword();
  		local.user = local.authenticator.createUser(local.accountName, local.password, local.password);
  		assertTrue(local.user.verifyPassword(local.password));
  		try {
  			local.authenticator.createUser(local.accountName, local.password, local.password);// duplicate user
  			fail();
  		}
  		catch(cfesapi.org.owasp.esapi.errors.AuthenticationAccountsException e) {
  			// success
  		}
  		try {
  			local.authenticator.createUser(instance.ESAPI.randomizer().getRandomString(8, newJava("org.owasp.esapi.reference.DefaultEncoder").CHAR_ALPHANUMERICS), "password1", "password2");// don't match
  			fail();
  		}
  		catch(cfesapi.org.owasp.esapi.errors.AuthenticationCredentialsException e) {
  			// success
  		}
  		try {
  			local.authenticator.createUser(instance.ESAPI.randomizer().getRandomString(8, newJava("org.owasp.esapi.reference.DefaultEncoder").CHAR_ALPHANUMERICS), "weak1", "weak1");// weak password
  			fail();
  		}
  		catch(cfesapi.org.owasp.esapi.errors.AuthenticationCredentialsException e) {
  			// success
  		}
  		try {
  			local.authenticator.createUser("", "weak1", "weak1");// null username
  			fail();
  		}
  		catch(cfesapi.org.owasp.esapi.errors.AuthenticationAccountsException e) {
  			// success
  		}
  		try {
  			local.authenticator.createUser(instance.ESAPI.randomizer().getRandomString(8, newJava("org.owasp.esapi.reference.DefaultEncoder").CHAR_ALPHANUMERICS), "", "");// null password
  			fail();
  		}
  		catch(cfesapi.org.owasp.esapi.errors.AuthenticationCredentialsException e) {
  			// success
  		}
  		try {
  			local.uName = "ea234kEknr";//sufficiently random password that also works as a username
  			local.authenticator.createUser(local.uName, local.uName, local.uName);// using username as password
  			fail();
  		}
  		catch(cfesapi.org.owasp.esapi.errors.AuthenticationCredentialsException e) {
  			// success
  		}
  	}
  	
  	/**
  	 * Test of generateStrongPassword method, of class
  	 * org.owasp.esapi.Authenticator.
  