Polish test gh-448

This commit is contained in:
Joe Grandja
2021-11-03 07:56:18 -04:00
parent 088d9a8e34
commit 25c4a7d541

View File

@@ -463,7 +463,7 @@ public class OAuth2TokenEndpointFilterTests {
AuthenticationDetailsSource<HttpServletRequest, WebAuthenticationDetails> authenticationDetailsSource =
mock(AuthenticationDetailsSource.class);
WebAuthenticationDetails webAuthenticationDetails = new WebAuthenticationDetails(request);
when(authenticationDetailsSource.buildDetails(request)).thenReturn(webAuthenticationDetails);
when(authenticationDetailsSource.buildDetails(any())).thenReturn(webAuthenticationDetails);
this.filter.setAuthenticationDetailsSource(authenticationDetailsSource);
OAuth2AccessToken accessToken = new OAuth2AccessToken(
@@ -484,7 +484,7 @@ public class OAuth2TokenEndpointFilterTests {
this.filter.doFilter(request, response, filterChain);
verify(authenticationDetailsSource).buildDetails(request);
verify(authenticationDetailsSource).buildDetails(any());
}
@Test