### Question:
SecurityUtil { public static String getAuthenticationType() { return StartupProperties.get().getProperty( AUTHENTICATION_TYPE, PseudoAuthenticationHandler.TYPE); } private  SecurityUtil(); static String getAuthenticationType(); static boolean isSecurityEnabled(); static String getLocalHostName(); static boolean isAuthorizationEnabled(); static boolean isCSRFFilterEnabled(); static AuthorizationProvider getAuthorizationProvider(); static void tryProxy(Entity entity, final String doAsUser); static final String AUTHENTICATION_TYPE; static final String NN_PRINCIPAL; static final String RM_PRINCIPAL; static final String HIVE_METASTORE_KERBEROS_PRINCIPAL; static final String METASTORE_USE_THRIFT_SASL; static final String METASTORE_PRINCIPAL; }### Answer:
@Test public void testDefaultGetAuthenticationType() throws Exception { Assert.assertEquals(SecurityUtil.getAuthenticationType(), "simple"); }
@Test public void testGetAuthenticationType() throws Exception { try { StartupProperties.get().setProperty(SecurityUtil.AUTHENTICATION_TYPE, "kerberos"); Assert.assertEquals(SecurityUtil.getAuthenticationType(), "kerberos"); } finally { StartupProperties.get().setProperty(SecurityUtil.AUTHENTICATION_TYPE, "simple"); } }