@Override
    public Token refreshToken(TokenRefreshRequest tokenRefreshRequest) {

        tokenService.verifyAndValidate(tokenRefreshRequest.getRefreshToken());

        final String adminId = tokenService
                .getPayload(tokenRefreshRequest.getRefreshToken())
                .get(TokenClaims.USER_ID.getValue())
                .toString();

        final UserEntity userEntityFromDB = userRepository
                .findById(adminId)
                .orElseThrow(UserNotFoundException::new);

        this.validateUserStatus(userEntityFromDB);

        return tokenService.generateToken(
                userEntityFromDB.getClaims(),
                tokenRefreshRequest.getRefreshToken()
        );

    }
@Test
    void refreshToken_InvalidRefreshToken_ThrowsException() {

        // Given
        String refreshTokenString = "invalidRefreshToken";
        TokenRefreshRequest tokenRefreshRequest = TokenRefreshRequest.builder()
                .refreshToken(refreshTokenString)
                .build();

        // Mock the behavior of verifyAndValidate to throw an exception
        doThrow(RuntimeException.class).when(tokenService).verifyAndValidate(refreshTokenString);

        // When, Then & Verify
        assertThrows(RuntimeException.class,
                () -> userRefreshTokenService.refreshToken(tokenRefreshRequest));

        // Verify that verifyAndValidate method was called with the expected argument
        verify(tokenService).verifyAndValidate(refreshTokenString);

        // Ensure no other interactions occurred
        verifyNoInteractions(userRepository);

    }