Skip to content

Commit

Permalink
[MODCONSKC-56] Remove duplicate bean
Browse files Browse the repository at this point in the history
  • Loading branch information
Saba-Zedginidze-EPAM committed Jan 8, 2025
1 parent 35831c9 commit f1de6aa
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,7 @@ class TenantControllerTest extends BaseIT {
@MockBean
UserTenantRepository userTenantRepository;
@MockBean
ConsortiaConfigurationServiceImpl configurationService;
@MockBean
ConsortiaConfigurationService consortiaConfigurationService;
ConsortiaConfigurationService configurationService;
@MockBean
KafkaService kafkaService;
@MockBean
Expand Down Expand Up @@ -171,7 +169,7 @@ void shouldSaveTenant(String contentString) throws Exception {
when(tenantDetailsRepository.save(any(TenantDetailsEntity.class))).thenReturn(tenantDetailsEntity);
when(tenantRepository.findCentralTenant()).thenReturn(Optional.of(centralTenant));
doNothing().when(syncPrimaryAffiliationService).syncPrimaryAffiliations(any(UUID.class), anyString(), anyString());
when(consortiaConfigurationService.createConfiguration(CENTRAL_TENANT_ID)).thenReturn(createConsortiaConfiguration(CENTRAL_TENANT_ID));
when(configurationService.createConfiguration(CENTRAL_TENANT_ID)).thenReturn(createConsortiaConfiguration(CENTRAL_TENANT_ID));

this.mockMvc.perform(
post("/consortia/7698e46-c3e3-11ed-afa1-0242ac120002/tenants?adminUserId=" + adminUser.getId())
Expand Down Expand Up @@ -274,7 +272,7 @@ void shouldGet4xxErrorWhileSaving(String contentString) throws Exception {

doReturn(new User()).when(usersKeycloakClient).getUsersByUserId(any());
when(tenantRepository.findCentralTenant()).thenReturn(Optional.of(centralTenant));
when(consortiaConfigurationService.createConfiguration(CENTRAL_TENANT_ID)).thenReturn(createConsortiaConfiguration(CENTRAL_TENANT_ID));
when(configurationService.createConfiguration(CENTRAL_TENANT_ID)).thenReturn(createConsortiaConfiguration(CENTRAL_TENANT_ID));

this.mockMvc.perform(post("/consortia/7698e46-c3e3-11ed-afa1-0242ac120002/tenants?adminUserId=111841e3-e6fb-4191-9fd8-5674a5107c34")
.headers(headers).content(contentString))
Expand Down Expand Up @@ -313,7 +311,7 @@ void shouldThrownMethodArgumentNotValidException(String contentString) throws Ex
when(consortiumRepository.existsById(consortiumId)).thenReturn(true);
when(tenantRepository.existsById(any(String.class))).thenReturn(false);
when(tenantRepository.findCentralTenant()).thenReturn(Optional.of(centralTenant));
when(consortiaConfigurationService.createConfiguration(CENTRAL_TENANT_ID)).thenReturn(createConsortiaConfiguration(CENTRAL_TENANT_ID));
when(configurationService.createConfiguration(CENTRAL_TENANT_ID)).thenReturn(createConsortiaConfiguration(CENTRAL_TENANT_ID));

Set<ConstraintViolation<?>> constraintViolations = new HashSet<>();
constraintViolations.add(mock(ConstraintViolation.class));
Expand Down

0 comments on commit f1de6aa

Please sign in to comment.