Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Aboruhen committed Dec 18, 2023
1 parent 699e16c commit e6e8e38
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.backbase.stream.service;

import static com.backbase.dbs.accesscontrol.api.service.v3.model.BatchResponseItemExtended.StatusEnum.HTTP_STATUS_BAD_REQUEST;
import static com.backbase.dbs.accesscontrol.api.service.v3.model.BatchResponseItemExtended.StatusEnum.HTTP_STATUS_INTERNAL_SERVER_ERROR;
import static com.backbase.dbs.accesscontrol.api.service.v3.model.BatchResponseItemExtended.StatusEnum.HTTP_STATUS_OK;
import static com.backbase.dbs.accesscontrol.api.service.v3.model.PresentationAction.ADD;
Expand Down Expand Up @@ -74,6 +75,8 @@
import org.mockito.Spy;
import org.mockito.junit.jupiter.MockitoExtension;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.springframework.http.HttpStatusCode;
import org.springframework.web.reactive.function.client.WebClientResponseException;
import org.springframework.web.client.HttpClientErrorException;
import reactor.core.publisher.Flux;
Expand Down Expand Up @@ -700,7 +703,7 @@ void testUpdateServiceAgreementItemFailed() {
serviceAgreement.setInternalId("internal-id");

when(serviceAgreementsApi.putServiceAgreementItem(any(), any()))
.thenReturn(Mono.error(new HttpClientErrorException(BAD_REQUEST, "Bad request", null, null, null)));
.thenReturn(Mono.error(new WebClientResponseException(BAD_REQUEST, "Bad request", null, null, null, null)));

Mono<ServiceAgreement> resultMono = subject.updateServiceAgreementItem(streamTask, serviceAgreement);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ void setupJobRole() {
.apsId(1L)
.name("jobRoleNew")
.description("jobRoleNew")
.type(PresentationIngestFunctionGroup.TypeEnum.REGULAR)
.type(PresentationIngestFunctionGroup.TypeEnum.TEMPLATE)
.metadata(Map.of("key1","value1"))
.addPermissionsItem(new PresentationPermission()
.functionId("101")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
import com.backbase.stream.legalentity.model.PhoneNumber;
import com.backbase.stream.legalentity.model.Privilege;
import com.backbase.stream.legalentity.model.ProductGroup;
import com.backbase.stream.legalentity.model.ReferenceJobRole;
import com.backbase.stream.legalentity.model.SavingsAccount;
import com.backbase.stream.legalentity.model.ServiceAgreement;
import com.backbase.stream.legalentity.model.User;
Expand Down Expand Up @@ -351,7 +350,7 @@ void productGroupsProcessedSequentially() {
.parentExternalId("parent-100000")
.legalEntityType(LegalEntityType.CUSTOMER)
.realmName("customer-bank")
.referenceJobRoles(Collections.singletonList((ReferenceJobRole) new ReferenceJobRole()
.referenceJobRoles(Collections.singletonList(new JobRole()
.name("Job Role with Limits").functionGroups(Collections.singletonList(new BusinessFunctionGroup()
.name("someFunctionGroup")
.addFunctionsItem(new BusinessFunction().functionId("1071").name("US Domestic Wire")
Expand Down

0 comments on commit e6e8e38

Please sign in to comment.