### Question:
PisCommonPaymentData extends InstanceDependableEntity implements Authorisable { @Override public String getInternalRequestId(AuthorisationType authorisationType) { if (authorisationType == AuthorisationType.PIS_CREATION) { return internalRequestId; } else if (authorisationType == AuthorisationType.PIS_CANCELLATION) { return cancellationInternalRequestId; } throw new IllegalArgumentException("Invalid authorisation type: " + authorisationType); }  @PostLoad void pisCommonPaymentDataPostLoad(); @PreUpdate void pisCommonPaymentDataPreUpdate(); @PrePersist void pisCommonPaymentDataPrePersist(); boolean isConfirmationExpired(long expirationPeriodMs); boolean isFinalised(); @Override String getExternalId(); @Override String getInternalRequestId(AuthorisationType authorisationType);  }### Answer:
@Test void getInternalRequestId_PisAuthorisation() { PisCommonPaymentData pisCommonPaymentData = new PisCommonPaymentData(); String expectedInternalRequestId = "internal-request-id"; pisCommonPaymentData.setInternalRequestId(expectedInternalRequestId); String actualInternalRequestId = pisCommonPaymentData.getInternalRequestId(AuthorisationType.PIS_CREATION); assertEquals(expectedInternalRequestId, actualInternalRequestId); }
@Test void getInternalRequestId_PisCancellationAuthorisation() { PisCommonPaymentData pisCommonPaymentData = new PisCommonPaymentData(); String expectedInternalRequestId = "internal-request-id"; pisCommonPaymentData.setCancellationInternalRequestId(expectedInternalRequestId); String actualInternalRequestId = pisCommonPaymentData.getInternalRequestId(AuthorisationType.PIS_CANCELLATION); assertEquals(expectedInternalRequestId, actualInternalRequestId); }
@Test void getInternalRequestId_AisAuthorisation_shouldThrowException() { PisCommonPaymentData pisCommonPaymentData = new PisCommonPaymentData(); assertThrows(IllegalArgumentException.class, () -> pisCommonPaymentData.getInternalRequestId(AuthorisationType.CONSENT)); }