From f18d0fd1a7081b34a00b5bf80a32cc23ff73dd44 Mon Sep 17 00:00:00 2001 From: Tao Sun Date: Mon, 16 Dec 2019 09:27:07 +0800 Subject: [PATCH] Test details using isEqualTo --- .../jackson2/UsernamePasswordAuthenticationTokenMixinTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/test/java/org/springframework/security/jackson2/UsernamePasswordAuthenticationTokenMixinTests.java b/core/src/test/java/org/springframework/security/jackson2/UsernamePasswordAuthenticationTokenMixinTests.java index 8818492048..7475476fe6 100644 --- a/core/src/test/java/org/springframework/security/jackson2/UsernamePasswordAuthenticationTokenMixinTests.java +++ b/core/src/test/java/org/springframework/security/jackson2/UsernamePasswordAuthenticationTokenMixinTests.java @@ -168,7 +168,7 @@ public class UsernamePasswordAuthenticationTokenMixinTests extends AbstractMixin assertThat(((User) token.getPrincipal()).getAuthorities()).isNotNull().hasSize(1).contains(new SimpleGrantedAuthority("ROLE_USER")); assertThat(token.isAuthenticated()).isEqualTo(true); assertThat(token.getAuthorities()).hasSize(1).contains(new SimpleGrantedAuthority("ROLE_USER")); - assertThat(token.getDetails()).isExactlyInstanceOf(String.class); + assertThat(token.getDetails()).isExactlyInstanceOf(String.class).isEqualTo("details"); } @Test