Browse Source

Fix test

Issue gh-6245
Joe Grandja 6 years ago
parent
commit
132a78ddde

+ 1 - 1
oauth2/oauth2-core/src/test/java/org/springframework/security/oauth2/core/converter/ClaimConversionServiceTests.java

@@ -88,7 +88,7 @@ public class ClaimConversionServiceTests {
 
 	@Test
 	public void convertInstantWhenDateThenConverts() {
-		Instant instant = Instant.now();
+		Instant instant = new Date().toInstant();
 		assertThat(this.conversionService.convert(Date.from(instant), Instant.class)).isEqualTo(instant);
 	}