@Test
public void testGetHostFromPrincipal() {

  assertEquals("host", 
      SecurityUtil.getHostFromPrincipal("service/host@realm"));
  assertEquals(null,
      SecurityUtil.getHostFromPrincipal("service@realm"));
}