use of uk.gov.pay.connector.events.model.refund.RefundSucceeded in project pay-connector by alphagov.
the class QueueMessageContractTest method verifyRefundedEvent.
@PactVerifyProvider("a refund succeeded message")
public String verifyRefundedEvent() throws JsonProcessingException {
String gatewayTransactionId = RandomStringUtils.randomAlphanumeric(14);
ChargeEntity chargeEntity = aValidChargeEntity().build();
Charge charge = Charge.from(chargeEntity);
RefundHistory refundHistory = aValidRefundHistoryEntity().withStatus(RefundStatus.REFUNDED.getValue()).withGatewayTransactionId(gatewayTransactionId).build();
RefundSucceeded refundSucceeded = RefundSucceeded.from(charge, refundHistory);
return refundSucceeded.toJsonString();
}
Aggregations