### Question:
Utilities { public static boolean isSecurityEnabled(Configuration configuration) { return SecurityUtil.getAuthenticationMethod(configuration) != UserGroupInformation.AuthenticationMethod.SIMPLE; }  static byte[] parseBase64(String encoded, String paramName); static boolean isValidDirectoryName(String name); static boolean isValidRestrictedDirectoryName(String name); static Object createAnyInstance(Class<?> confClass,
                                           String className, RequestContext metaData); static Object createAnyInstance(String className); static void byteArrayToOctalString(byte[] bytes, StringBuilder sb); static String maskNonPrintables(String input); static FragmentMetadata parseFragmentMetadata(RequestContext context); static boolean aggregateOptimizationsSupported(RequestContext requestContext); static boolean implementsInterface(String className, Class<?> iface); static boolean isFragmenterCacheEnabled(); static String absoluteDataPath(String dataSource); static boolean isSecurityEnabled(Configuration configuration); static String rightTrimWhiteSpace(String s); static String getHost(String uri); static final Pattern SCHEME_PATTERN; static final Pattern NON_HOSTNAME_CHARACTERS; }### Answer:
@Test public void testSecurityIsDisabledOnNewConfiguration() { Configuration configuration = new Configuration(); assertFalse(Utilities.isSecurityEnabled(configuration)); }
@Test public void testSecurityIsDisabledWithSimpleAuthentication() { Configuration configuration = new Configuration(); configuration.set("hadoop.security.authentication", "simple"); assertFalse(Utilities.isSecurityEnabled(configuration)); }
@Test public void testSecurityIsEnabledWithKerberosAuthentication() { Configuration configuration = new Configuration(); configuration.set("hadoop.security.authentication", "kerberos"); assertTrue(Utilities.isSecurityEnabled(configuration)); }