diff --git a/web/src/test/java/org/springframework/security/web/webauthn/authentication/WebAuthnAuthenticationTests.java b/web/src/test/java/org/springframework/security/web/webauthn/authentication/WebAuthnAuthenticationTests.java index 2915230107..72874d012f 100644 --- a/web/src/test/java/org/springframework/security/web/webauthn/authentication/WebAuthnAuthenticationTests.java +++ b/web/src/test/java/org/springframework/security/web/webauthn/authentication/WebAuthnAuthenticationTests.java @@ -62,9 +62,12 @@ void testSerialization() { List authorities = AuthorityUtils.createAuthorityList("ROLE_USER"); WebAuthnAuthentication authentication = new WebAuthnAuthentication(userEntity, authorities); byte[] serialize = SerializationUtils.serialize(authentication); - WebAuthnAuthentication deserializeAuthentication = (WebAuthnAuthentication) SerializationUtils.deserialize(serialize); - assertThat(deserializeAuthentication.getPrincipal().getName()).isEqualTo(authentication.getPrincipal().getName()); - assertThat(deserializeAuthentication.getPrincipal().getDisplayName()).isEqualTo(authentication.getPrincipal().getDisplayName()); + WebAuthnAuthentication deserializeAuthentication = (WebAuthnAuthentication) SerializationUtils + .deserialize(serialize); + assertThat(deserializeAuthentication.getPrincipal().getName()) + .isEqualTo(authentication.getPrincipal().getName()); + assertThat(deserializeAuthentication.getPrincipal().getDisplayName()) + .isEqualTo(authentication.getPrincipal().getDisplayName()); assertThat(deserializeAuthentication.getPrincipal().getId()).isEqualTo(authentication.getPrincipal().getId()); }