@Test
public void testValidUsernamePassword() {
AuthenticationToken token = new UsernamePasswordToken(getCurrentUserName(), "somePassword");
AuthenticationInfo authcInfo = this.realm.getAuthenticationInfo(token);
PrincipalCollection principals = authcInfo.getPrincipals();
assertFalse(principals.isEmpty());
Object primaryPrincipal = principals.getPrimaryPrincipal();
assertNotNull(primaryPrincipal);
Assertions.assertThat(primaryPrincipal).isInstanceOf(WaffleFqnPrincipal.class);
WaffleFqnPrincipal fqnPrincipal = (WaffleFqnPrincipal) primaryPrincipal;
Assertions.assertThat(fqnPrincipal.getFqn()).isEqualTo(getCurrentUserName());
Assertions.assertThat(fqnPrincipal.getGroupFqns()).contains("Users", "Everyone");