diff --git a/src/test/java/org/opensearch/security/authtoken/jwt/JwtVendorTest.java b/src/test/java/org/opensearch/security/authtoken/jwt/JwtVendorTest.java index 5afe7271e8..7c03ff912d 100644 --- a/src/test/java/org/opensearch/security/authtoken/jwt/JwtVendorTest.java +++ b/src/test/java/org/opensearch/security/authtoken/jwt/JwtVendorTest.java @@ -161,7 +161,7 @@ public void testCreateJwtWithBadEncryptionKey() { throw new RuntimeException(e); } }); - Assert.assertEquals("java.lang.RuntimeException: encryption_key cannot be null", exception.getMessage()); + Assert.assertEquals("java.lang.IllegalArgumentException: encryption_key cannot be null", exception.getMessage()); } @Test