diff --git a/vorgang-manager-server/src/test/java/de/ozgcloud/vorgang/collaboration/CollaborationITCase.java b/vorgang-manager-server/src/test/java/de/ozgcloud/vorgang/collaboration/CollaborationITCase.java index 2a9d8659032b1ea7aa719ebab32e5f1570c3d361..f73ea147c5bebaf8475ec0fa9206f26780363d4b 100644 --- a/vorgang-manager-server/src/test/java/de/ozgcloud/vorgang/collaboration/CollaborationITCase.java +++ b/vorgang-manager-server/src/test/java/de/ozgcloud/vorgang/collaboration/CollaborationITCase.java @@ -47,6 +47,7 @@ import org.mockito.ArgumentCaptor; import org.mockito.Captor; import org.mockito.Mock; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.data.mongodb.core.MongoOperations; @@ -61,6 +62,7 @@ import com.thedeanda.lorem.LoremIpsum; import de.ozgcloud.apilib.user.OzgCloudUserId; import de.ozgcloud.apilib.user.OzgCloudUserProfile; import de.ozgcloud.apilib.user.OzgCloudUserProfileService; +import de.ozgcloud.collaboration.CollaborationManagerConfiguration; import de.ozgcloud.collaboration.CollaborationRequest; import de.ozgcloud.collaboration.CollaborationServiceGrpc.CollaborationServiceBlockingStub; import de.ozgcloud.collaboration.GrpcGetFileContentRequest; @@ -122,7 +124,8 @@ class CollaborationITCase { private MongoOperations mongoOperations; @MockBean - private OzgCloudUserProfileService ozgCloudUserProfileService; + @Qualifier(CollaborationManagerConfiguration.OZG_CLOUD_USER_PROFILE_SERVICE_NAME) + private OzgCloudUserProfileService collaborationOzgCloudUserProfileService; @MockBean private PostfachRemoteService postfachRemoteService; @@ -241,7 +244,7 @@ class CollaborationITCase { @BeforeEach void init() { when(ozgCloudUserProfile.getId()).thenReturn(OzgCloudUserId.from(CommandTestFactory.CREATED_BY)); - when(ozgCloudUserProfileService.getById(any())).thenReturn(ozgCloudUserProfile); + when(collaborationOzgCloudUserProfileService.getById(any())).thenReturn(ozgCloudUserProfile); } @Test @@ -289,7 +292,7 @@ class CollaborationITCase { @BeforeEach void init() { when(ozgCloudUserProfile.getId()).thenReturn(OzgCloudUserId.from(CommandTestFactory.CREATED_BY)); - when(ozgCloudUserProfileService.getById(any())).thenReturn(ozgCloudUserProfile); + when(collaborationOzgCloudUserProfileService.getById(any())).thenReturn(ozgCloudUserProfile); } @Test