diff --git a/config/src/test/java/org/springframework/security/SpringSecurityCoreVersionSerializableTests.java b/config/src/test/java/org/springframework/security/SpringSecurityCoreVersionSerializableTests.java index d9c58440db..1254fb9c8f 100644 --- a/config/src/test/java/org/springframework/security/SpringSecurityCoreVersionSerializableTests.java +++ b/config/src/test/java/org/springframework/security/SpringSecurityCoreVersionSerializableTests.java @@ -125,6 +125,7 @@ import org.springframework.security.saml2.provider.service.authentication.TestSaml2RedirectAuthenticationRequests; import org.springframework.security.web.authentication.WebAuthenticationDetails; import org.springframework.security.web.authentication.preauth.PreAuthenticatedAuthenticationToken; +import org.springframework.security.web.webauthn.api.Bytes; import org.springframework.security.web.webauthn.api.PublicKeyCredentialUserEntity; import org.springframework.security.web.webauthn.api.TestPublicKeyCredentialUserEntity; @@ -323,13 +324,12 @@ class SpringSecurityCoreVersionSerializableTests { token.setDetails(details); return token; }); - generatorByClassName.put(PublicKeyCredentialUserEntity.class, - (r) -> TestPublicKeyCredentialUserEntity.userEntity().build()); + generatorByClassName.put(Bytes.class, (r) -> Bytes.random()); } @ParameterizedTest @MethodSource("getClassesToSerialize") - @Disabled("This method should only be used to serialize the classes once") + @Disabled("This method should only be used to serialize the classes once") void serializeCurrentVersionClasses(Class clazz) throws Exception { Files.createDirectories(currentVersionFolder); Path filePath = Paths.get(currentVersionFolder.toAbsolutePath() + "/" + clazz.getName() + ".serialized");