### Question:
AuthConfigUtils { public static byte[] hash(final char[] data, final byte[] salt) throws NoSuchAlgorithmException, InvalidKeySpecException { SecretKeyFactory secretKeyFactory = SecretKeyFactory.getInstance(PBKDF2_WITH_HMAC); PBEKeySpec spec = new PBEKeySpec(data, salt, ITERATIONS, KEY_LENGTH); SecretKey key = secretKeyFactory.generateSecret(spec); return key.getEncoded(); }  static JsonObject getAuthConfig(JsonObject config); static JsonObject getVaultConfig(JsonObject config); static String getVaultKey(JsonObject config); static boolean isLdapEnabled(JsonObject config); static JsonObject getLdapConfig(JsonObject config); static String getLdapUrl(JsonObject config); static List<MessageFormat> getUserDnPatterns(JsonObject config); static String[] getDisplayNameAttributeID(JsonObject config); static byte[] hash(final char[] data, final byte[] salt);  }### Answer:
@Test public void hashTest() throws Exception { Vault vault = new Vault(KEY, PATH); byte[] hash1 = AuthConfigUtils.hash("test".toCharArray(), SALT); byte[] hash2 = AuthConfigUtils.hash("test".toCharArray(), SALT); byte[] hash3 = AuthConfigUtils.hash("tEst".toCharArray(), SALT); Assert.assertTrue("Hashes of the same string should be equal.", Arrays.equals(hash1, hash2)); Assert.assertFalse("Hashes of the different strings should not be equal.", Arrays.equals(hash2, hash3)); }