From 804f20045efc7f4e386c75bee49eed32b84a3380 Mon Sep 17 00:00:00 2001 From: Steve Riesenberg Date: Wed, 12 Oct 2022 12:08:42 -0500 Subject: [PATCH] Polish XorCsrfTokenRequestAttributeHandlerTests --- .../csrf/XorCsrfTokenRequestAttributeHandlerTests.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/web/src/test/java/org/springframework/security/web/csrf/XorCsrfTokenRequestAttributeHandlerTests.java b/web/src/test/java/org/springframework/security/web/csrf/XorCsrfTokenRequestAttributeHandlerTests.java index 349e337d9f..142f90254d 100644 --- a/web/src/test/java/org/springframework/security/web/csrf/XorCsrfTokenRequestAttributeHandlerTests.java +++ b/web/src/test/java/org/springframework/security/web/csrf/XorCsrfTokenRequestAttributeHandlerTests.java @@ -159,14 +159,20 @@ public class XorCsrfTokenRequestAttributeHandlerTests { @Test public void resolveCsrfTokenValueWhenRequestIsNullThenThrowsIllegalArgumentException() { - assertThatIllegalArgumentException().isThrownBy(() -> this.handler.resolveCsrfTokenValue(null, this.token)) + // @formatter:off + assertThatIllegalArgumentException() + .isThrownBy(() -> this.handler.resolveCsrfTokenValue(null, this.token)) .withMessage("request cannot be null"); + // @formatter:on } @Test public void resolveCsrfTokenValueWhenCsrfTokenIsNullThenThrowsIllegalArgumentException() { - assertThatIllegalArgumentException().isThrownBy(() -> this.handler.resolveCsrfTokenValue(this.request, null)) + // @formatter:off + assertThatIllegalArgumentException() + .isThrownBy(() -> this.handler.resolveCsrfTokenValue(this.request, null)) .withMessage("csrfToken cannot be null"); + // @formatter:on } @Test