From 81294b54f44ae69af01e9a55c21f8b4ec0997ea2 Mon Sep 17 00:00:00 2001 From: Eric Leung Date: Fri, 13 Oct 2023 14:49:35 -0400 Subject: [PATCH] [ELY-2685] Replace assert in PasswordBasedEncryptionUtilTest with a proper check --- .../security/util/PasswordBasedEncryptionUtilTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/base/src/test/java/org/wildfly/security/util/PasswordBasedEncryptionUtilTest.java b/tests/base/src/test/java/org/wildfly/security/util/PasswordBasedEncryptionUtilTest.java index b0fc5420197..a1d52d000e3 100644 --- a/tests/base/src/test/java/org/wildfly/security/util/PasswordBasedEncryptionUtilTest.java +++ b/tests/base/src/test/java/org/wildfly/security/util/PasswordBasedEncryptionUtilTest.java @@ -183,9 +183,9 @@ private void checkPb(String secret, String salt, int iteration, String pbGenerat String crossDecrypted = new String(decryptUtil.decodeAndDecrypt(pbGenerated)); String decrypted = new String(decryptUtil.decodeAndDecrypt(encrypted)); - Assert.assertTrue("Elytron in PB compatible mode failed", decrypted.equals(secret)); - Assert.assertTrue("PicketBox encrypted, Elytron decrypted in compatible mode, failed", crossDecrypted.equals(secret)); - Assert.assertTrue("Elytron in compatible mode encrypted, PicketBox encrypted must be the same", pbGenerated.equals(encrypted)); + Assert.assertEquals("Elytron in PB compatible mode failed", decrypted, secret); + Assert.assertEquals("PicketBox encrypted, Elytron decrypted in compatible mode, failed", crossDecrypted, secret); + Assert.assertEquals("Elytron in compatible mode encrypted, PicketBox encrypted must be the same", pbGenerated, encrypted); }