@Test void getTokenByRefreshTokenException() { String refreshToken = "refresh-token333"; when(oAuthClient.obtainTokenDetailsByRefreshToken(refreshToken)) .thenThrow(new ObtainRefreshTokenException()); assertThrows(ObtainRefreshTokenException.class, () -> service.getTokenByRefreshToken(refreshToken)); }
public TokenDetails getTokenByRefreshToken(String refreshToken) throws ObtainRefreshTokenException { return oAuthClient.obtainTokenDetailsByRefreshToken(refreshToken); }
TokenService { public TokenDetails getTokenByRefreshToken(String refreshToken) throws ObtainRefreshTokenException { return oAuthClient.obtainTokenDetailsByRefreshToken(refreshToken); } }
TokenService { public TokenDetails getTokenByRefreshToken(String refreshToken) throws ObtainRefreshTokenException { return oAuthClient.obtainTokenDetailsByRefreshToken(refreshToken); } @Autowired  TokenService(UsersTokenService usersTokenService,
                        ApplicationTokenService applicationTokenService,
                        OAuthClient oAuthClient); }
TokenService { public TokenDetails getTokenByRefreshToken(String refreshToken) throws ObtainRefreshTokenException { return oAuthClient.obtainTokenDetailsByRefreshToken(refreshToken); } @Autowired  TokenService(UsersTokenService usersTokenService,
                        ApplicationTokenService applicationTokenService,
                        OAuthClient oAuthClient); TokenDetails getTokenDetails(); TokenDetails getTokenByRefreshToken(String refreshToken); }
TokenService { public TokenDetails getTokenByRefreshToken(String refreshToken) throws ObtainRefreshTokenException { return oAuthClient.obtainTokenDetailsByRefreshToken(refreshToken); } @Autowired  TokenService(UsersTokenService usersTokenService,
                        ApplicationTokenService applicationTokenService,
                        OAuthClient oAuthClient); TokenDetails getTokenDetails(); TokenDetails getTokenByRefreshToken(String refreshToken);  }