public static AMIdentity createATestUser(SSOToken adminToken,String username,String realm) throws IdRepoException, SSOException {
  AMIdentityRepository amir=new AMIdentityRepository(adminToken,realm);
  Map<String,Set<String>> attrValues=new HashMap<String,Set<String>>();
  Set<String> set=new HashSet<String>();
  set.add(username);
  attrValues.put("givenname",set);
  attrValues.put("sn",set);
  attrValues.put("cn",set);
  attrValues.put("userpassword",set);
  return amir.createIdentity(IdType.USER,username,attrValues);
}

public static AMIdentity createATestUser ( SSOToken adminToken , String username , String realm ) throws IdRepoException , SSOException { AMIdentityRepository amir = new AMIdentityRepository ( adminToken , realm ) ; Map < String , Set < String > > attrValues = new HashMap < String , Set < String > > ( ) ; Set < String > set = new HashSet < String > ( ) ; set . add ( username ) ; attrValues . put ( "givenname" , set ) ; attrValues . put ( "sn" , set ) ; attrValues . put ( "cn" , set ) ; attrValues . put ( "userpassword" , set ) ; return amir . createIdentity ( IdType . USER , username , attrValues ) ; }
create a amidentity user for using in test cases , uses username for password .
