@Override
    public void invalidateTokens(Set<String> tokenIds) {

        final Set<InvalidTokenEntity> enocaInvalidTokenEntities = tokenIds.stream()
                .map(tokenId -> InvalidTokenEntity.builder()
                        .tokenId(tokenId)
                        .build()
                )
                .collect(Collectors.toSet());

        invalidTokenRepository.saveAll(enocaInvalidTokenEntities);
    }
@Test
    void givenTokenIds_whenInvalidateTokens_thenSaveAllTokens() {

        // Given
        Set<String> tokenIds = Set.of("token1", "token2");

        // When
        invalidTokenService.invalidateTokens(tokenIds);

        // Then
        ArgumentCaptor<Set<InvalidTokenEntity>> captor = ArgumentCaptor.forClass(Set.class);
        verify(invalidTokenRepository).saveAll(captor.capture());
        Set<InvalidTokenEntity> capturedTokens = captor.getValue();

        assertThat(capturedTokens)
                .hasSize(2)
                .extracting("tokenId")
                .containsExactlyInAnyOrder("token1", "token2");

    }