@Test public void testFromNameInNetBiosFormat() { PrincipalId idInNB = PrincipalUtil.fromName(PRINCIPAL_NETBIOS); assertEquals(PRINCIPAL_NAME, idInNB.getName()); assertEquals(PRINCIPAL_DOMAIN, idInNB.getDomain()); }
@Test public void testFromNameInUPN() { PrincipalId idInUPN = PrincipalUtil.fromName(PRINCIPAL_UPN); assertEquals(PRINCIPAL_NAME, idInUPN.getName()); assertEquals(PRINCIPAL_DOMAIN, idInUPN.getDomain()); }