AbstractStupsAccessTokenProvider implements AccessTokenProvider { @Override public OAuth2AccessToken refreshAccessToken(final OAuth2ProtectedResourceDetails resource, final OAuth2RefreshToken refreshToken, final AccessTokenRequest request) throws UserRedirectRequiredException { throw new UnsupportedOperationException("Not Supported 'refreshAccessToken'"); }  @Override boolean supportsResource(final OAuth2ProtectedResourceDetails resource); @Override OAuth2AccessToken refreshAccessToken(final OAuth2ProtectedResourceDetails resource,
            final OAuth2RefreshToken refreshToken, final AccessTokenRequest request); @Override boolean supportsRefresh(final OAuth2ProtectedResourceDetails resource);  }
@Test(expected = UnsupportedOperationException.class) public void testRefreshAccessToken() { accessTokenProvider.refreshAccessToken(mock(OAuth2ProtectedResourceDetails.class), mock(OAuth2RefreshToken.class), mock(AccessTokenRequest.class)); }