@Test (timeout = 30000)
public void testCreateRemoteUser() {

  UserGroupInformation ugi = UserGroupInformation.createRemoteUser("user1");
  assertEquals(AuthenticationMethod.SIMPLE, ugi.getAuthenticationMethod());
  assertTrue (ugi.toString().contains("(auth:SIMPLE)"));
  ugi = UserGroupInformation.createRemoteUser("user1", 
      AuthMethod.KERBEROS);
  assertEquals(AuthenticationMethod.KERBEROS, ugi.getAuthenticationMethod());
  assertTrue (ugi.toString().contains("(auth:KERBEROS)"));
}