@Test public void testUserNullPasswordIdentity() { UserPasswordIdentity identity = IdentityFactory.createFromUserPassword("USER", null); Assert.assertThat(identity.getUsername(), equalTo("USER")); Assert.assertThat(identity.getPassword(), nullValue()); }
public static UserPasswordIdentity createFromUserPassword(String user, String password) { return new UserPasswordIdentity(user,password); }
IdentityFactory { public static UserPasswordIdentity createFromUserPassword(String user, String password) { return new UserPasswordIdentity(user,password); } }
IdentityFactory { public static UserPasswordIdentity createFromUserPassword(String user, String password) { return new UserPasswordIdentity(user,password); } private  IdentityFactory(); }
IdentityFactory { public static UserPasswordIdentity createFromUserPassword(String user, String password) { return new UserPasswordIdentity(user,password); } private  IdentityFactory(); static TokenIdentity createFromToken(String token); static UserPasswordIdentity createFromUserPassword(String user, String password); }
IdentityFactory { public static UserPasswordIdentity createFromUserPassword(String user, String password) { return new UserPasswordIdentity(user,password); } private  IdentityFactory(); static TokenIdentity createFromToken(String token); static UserPasswordIdentity createFromUserPassword(String user, String password);  }