Skip to content

Commit

Permalink
[SELC-5740] fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
flaminiaScarciofolo committed Oct 16, 2024
1 parent 82e031e commit 49b66bf
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import it.pagopa.selfcare.user.event.UserGroupCdcService;
import it.pagopa.selfcare.user.event.entity.UserGroupEntity;
import jakarta.inject.Inject;
import org.bson.BsonDocument;
import org.eclipse.microprofile.rest.client.inject.RestClient;
import org.junit.jupiter.api.Test;
import org.mockito.Mockito;
Expand All @@ -31,6 +32,8 @@ void consumerToSendScUserGroupEventTest() {
UserGroupEntity userGroupEntity = dummyUserGroup();
ChangeStreamDocument<UserGroupEntity> document = Mockito.mock(ChangeStreamDocument.class);
when(document.getFullDocument()).thenReturn(userGroupEntity);
BsonDocument bsonDocument = Mockito.mock(BsonDocument.class);
when(document.getDocumentKey()).thenReturn(bsonDocument);
userGroupCdcService.consumerToSendScUserGroupEvent(document);
verify(eventHubRestClient, times(1)).
sendMessage(any());
Expand Down

0 comments on commit 49b66bf

Please sign in to comment.