use of com.paypal.kyc.model.KYCUserStatusNotificationBodyModel in project mirakl-hyperwallet-connector by paypal.
the class HyperWalletObjectToKYCUserStatusExecutorNotificationBodyModelConverterTest method convert_shouldTransformHyperWalletWebhookUserNotificationWithBusinessStakeHolderRequirementToKycUserStatusNotificationModelWithBusinessStakeholderReasonType_whenDetailsIsNotNull.
@Test
void convert_shouldTransformHyperWalletWebhookUserNotificationWithBusinessStakeHolderRequirementToKycUserStatusNotificationModelWithBusinessStakeholderReasonType_whenDetailsIsNotNull() {
final Map<String, String> hyperWalletKycUserBodyNotification = createHyperWalletKycBusinessUserBodyNotification(HyperwalletUser.BusinessStakeholderVerificationStatus.REQUIRED, HyperwalletUser.LetterOfAuthorizationStatus.NOT_REQUIRED);
when(kycRejectionReasonServiceMock.getReasonTypes(hyperWalletKycUserBodyNotification)).thenReturn(List.of(KYCRejectionReasonTypeEnum.BUSINESS_STAKEHOLDER_REQUIRED));
final KYCUserStatusNotificationBodyModel result = testObj.convert(hyperWalletKycUserBodyNotification);
assertThat(result.getClientUserId()).isEqualTo(CLIENT_USER_ID);
assertThat(result.getProfileType()).isEqualTo(BUSINESS_PROFILE_TYPE);
assertThat(result.getVerificationStatus()).isEqualTo(HyperwalletUser.VerificationStatus.NOT_REQUIRED);
assertThat(result.getReasonsType()).containsExactly(KYCRejectionReasonTypeEnum.BUSINESS_STAKEHOLDER_REQUIRED);
}
Aggregations