@Test
public void testSetAuthenticationMethod() {

  Configuration conf = new Configuration();
  // default
  SecurityUtil.setAuthenticationMethod(null, conf);
  assertEquals("simple", conf.get(HADOOP_SECURITY_AUTHENTICATION));
  // simple
  SecurityUtil.setAuthenticationMethod(SIMPLE, conf);
  assertEquals("simple", conf.get(HADOOP_SECURITY_AUTHENTICATION));
  // kerberos
  SecurityUtil.setAuthenticationMethod(KERBEROS, conf);
  assertEquals("kerberos", conf.get(HADOOP_SECURITY_AUTHENTICATION));
}