diff --git a/src/main/java/uk/gov/pay/connector/charge/model/domain/ChargeEntity.java b/src/main/java/uk/gov/pay/connector/charge/model/domain/ChargeEntity.java index 8490d65ec3..e3d126f61f 100644 --- a/src/main/java/uk/gov/pay/connector/charge/model/domain/ChargeEntity.java +++ b/src/main/java/uk/gov/pay/connector/charge/model/domain/ChargeEntity.java @@ -55,6 +55,7 @@ import static java.lang.String.format; import static net.logstash.logback.argument.StructuredArguments.kv; +import static uk.gov.pay.commons.model.Source.CARD_EXTERNAL_TELEPHONE; import static uk.gov.pay.connector.charge.model.domain.ChargeStatus.CAPTURED; import static uk.gov.pay.connector.charge.model.domain.ChargeStatus.CAPTURE_SUBMITTED; import static uk.gov.pay.connector.charge.model.domain.ChargeStatus.UNDEFINED; @@ -167,42 +168,23 @@ public ChargeEntity() { //for jpa } - public ChargeEntity(Long amount, String returnUrl, String description, ServicePaymentReference reference, - GatewayAccountEntity gatewayAccount, String email, SupportedLanguage language, - boolean delayedCapture, ExternalMetadata externalMetadata, Source source) { - this(amount, UNDEFINED, returnUrl, description, reference, gatewayAccount, email, ZonedDateTime.now(ZoneId.of("UTC")), language, delayedCapture, externalMetadata, source); - } - - public ChargeEntity(Long amount, - ServicePaymentReference reference, - String description, - ChargeStatus status, - String email, - CardDetailsEntity cardDetails, - ExternalMetadata externalMetadata, - GatewayAccountEntity gatewayAccount, - String gatewayTransactionId, - SupportedLanguage language, - Source source) { - this.amount = amount; - this.reference = reference; - this.description = description; - this.status = status.getValue(); - this.email = email; - this.createdDate = ZonedDateTime.now(ZoneId.of("UTC")); - this.cardDetails = cardDetails; - this.externalMetadata = externalMetadata; - this.gatewayAccount = gatewayAccount; - this.externalId = RandomIdGenerator.newId(); - this.gatewayTransactionId = gatewayTransactionId; - this.language = language; - this.source = source; - } - // Only the ChargeEntityFixture should directly call this constructor - public ChargeEntity(Long amount, ChargeStatus status, String returnUrl, String description, ServicePaymentReference reference, - GatewayAccountEntity gatewayAccount, String email, ZonedDateTime createdDate, SupportedLanguage language, - boolean delayedCapture, ExternalMetadata externalMetadata, Source source) { + ChargeEntity( + Long amount, + ChargeStatus status, + String returnUrl, + String description, + ServicePaymentReference reference, + GatewayAccountEntity gatewayAccount, + String email, + ZonedDateTime createdDate, + SupportedLanguage language, + boolean delayedCapture, + ExternalMetadata externalMetadata, + Source source, + String gatewayTransactionId, + CardDetailsEntity cardDetails + ) { this.amount = amount; this.status = status.getValue(); this.returnUrl = returnUrl; @@ -216,6 +198,8 @@ public ChargeEntity(Long amount, ChargeStatus status, String returnUrl, String d this.delayedCapture = delayedCapture; this.externalMetadata = externalMetadata; this.source = source; + this.gatewayTransactionId = gatewayTransactionId; + this.cardDetails = cardDetails; } public Long getId() { @@ -433,4 +417,168 @@ public Source getSource() { public void setSource(Source source) { this.source = source; } + + public static final class WebChargeEntityBuilder { + private Long amount; + private String returnUrl; + private String email; + private GatewayAccountEntity gatewayAccount; + private String description; + private ServicePaymentReference reference; + private SupportedLanguage language; + private boolean delayedCapture; + private ExternalMetadata externalMetadata; + private Source source; + + private WebChargeEntityBuilder() { + } + + public static WebChargeEntityBuilder aWebChargeEntity() { + return new WebChargeEntityBuilder(); + } + + public WebChargeEntityBuilder withAmount(Long amount) { + this.amount = amount; + return this; + } + + public WebChargeEntityBuilder withReturnUrl(String returnUrl) { + this.returnUrl = returnUrl; + return this; + } + + public WebChargeEntityBuilder withEmail(String email) { + this.email = email; + return this; + } + + public WebChargeEntityBuilder withGatewayAccount(GatewayAccountEntity gatewayAccount) { + this.gatewayAccount = gatewayAccount; + return this; + } + + public WebChargeEntityBuilder withDescription(String description) { + this.description = description; + return this; + } + + public WebChargeEntityBuilder withReference(ServicePaymentReference reference) { + this.reference = reference; + return this; + } + + public WebChargeEntityBuilder withLanguage(SupportedLanguage language) { + this.language = language; + return this; + } + + public WebChargeEntityBuilder withDelayedCapture(boolean delayedCapture) { + this.delayedCapture = delayedCapture; + return this; + } + + public WebChargeEntityBuilder withExternalMetadata(ExternalMetadata externalMetadata) { + this.externalMetadata = externalMetadata; + return this; + } + + public WebChargeEntityBuilder withSource(Source source) { + this.source = source; + return this; + } + + public ChargeEntity build() { + return new ChargeEntity( + amount, + UNDEFINED, + returnUrl, + description, + reference, + gatewayAccount, + email, + ZonedDateTime.now(ZoneId.of("UTC")), + language, + delayedCapture, + externalMetadata, + source, + null, + null); + } + } + + public static final class TelephoneChargeEntityBuilder { + private Long amount; + private String gatewayTransactionId; + private String email; + private CardDetailsEntity cardDetails; + private GatewayAccountEntity gatewayAccount; + private String description; + private ServicePaymentReference reference; + private ExternalMetadata externalMetadata; + + private TelephoneChargeEntityBuilder() { + } + + public static TelephoneChargeEntityBuilder aTelephoneChargeEntity() { + return new TelephoneChargeEntityBuilder(); + } + + public TelephoneChargeEntityBuilder withAmount(Long amount) { + this.amount = amount; + return this; + } + + public TelephoneChargeEntityBuilder withGatewayTransactionId(String gatewayTransactionId) { + this.gatewayTransactionId = gatewayTransactionId; + return this; + } + + public TelephoneChargeEntityBuilder withEmail(String email) { + this.email = email; + return this; + } + + public TelephoneChargeEntityBuilder withCardDetails(CardDetailsEntity cardDetails) { + this.cardDetails = cardDetails; + return this; + } + + public TelephoneChargeEntityBuilder withGatewayAccount(GatewayAccountEntity gatewayAccount) { + this.gatewayAccount = gatewayAccount; + return this; + } + + public TelephoneChargeEntityBuilder withDescription(String description) { + this.description = description; + return this; + } + + public TelephoneChargeEntityBuilder withReference(ServicePaymentReference reference) { + this.reference = reference; + return this; + } + + public TelephoneChargeEntityBuilder withExternalMetadata(ExternalMetadata externalMetadata) { + this.externalMetadata = externalMetadata; + return this; + } + + public ChargeEntity build() { + return new ChargeEntity( + amount, + UNDEFINED, + null, + description, + reference, + gatewayAccount, + email, + ZonedDateTime.now(ZoneId.of("UTC")), + SupportedLanguage.ENGLISH, + false, + externalMetadata, + CARD_EXTERNAL_TELEPHONE, + gatewayTransactionId, + cardDetails); + } + } } diff --git a/src/main/java/uk/gov/pay/connector/charge/service/ChargeService.java b/src/main/java/uk/gov/pay/connector/charge/service/ChargeService.java index e0845a0dfe..120bddc9c0 100644 --- a/src/main/java/uk/gov/pay/connector/charge/service/ChargeService.java +++ b/src/main/java/uk/gov/pay/connector/charge/service/ChargeService.java @@ -77,8 +77,9 @@ import static javax.ws.rs.HttpMethod.POST; import static javax.ws.rs.core.MediaType.APPLICATION_FORM_URLENCODED; import static org.apache.commons.lang3.StringUtils.isBlank; -import static uk.gov.pay.commons.model.Source.CARD_EXTERNAL_TELEPHONE; import static uk.gov.pay.connector.charge.model.ChargeResponse.aChargeResponseBuilder; +import static uk.gov.pay.connector.charge.model.domain.ChargeEntity.TelephoneChargeEntityBuilder.aTelephoneChargeEntity; +import static uk.gov.pay.connector.charge.model.domain.ChargeEntity.WebChargeEntityBuilder.aWebChargeEntity; import static uk.gov.pay.connector.charge.model.domain.ChargeStatus.AUTHORISATION_ERROR; import static uk.gov.pay.connector.charge.model.domain.ChargeStatus.AUTHORISATION_REJECTED; import static uk.gov.pay.connector.charge.model.domain.ChargeStatus.AWAITING_CAPTURE_REQUEST; @@ -88,7 +89,6 @@ import static uk.gov.pay.connector.charge.model.domain.ChargeStatus.CREATED; import static uk.gov.pay.connector.charge.model.domain.ChargeStatus.ENTERING_CARD_DETAILS; import static uk.gov.pay.connector.charge.model.domain.ChargeStatus.PAYMENT_NOTIFICATION_CREATED; -import static uk.gov.pay.connector.charge.model.domain.ChargeStatus.UNDEFINED; import static uk.gov.pay.connector.charge.model.domain.ChargeStatus.fromString; import static uk.gov.pay.connector.common.model.domain.NumbersInStringsSanitizer.sanitize; @@ -156,20 +156,17 @@ private Optional createCharge(TelephoneChargeCreateRequest telepho null ); - ChargeEntity chargeEntity = new ChargeEntity( - telephoneChargeRequest.getAmount(), - ServicePaymentReference.of(telephoneChargeRequest.getReference()), - telephoneChargeRequest.getDescription(), - UNDEFINED, - telephoneChargeRequest.getEmailAddress().orElse(null), - cardDetails, - storeExtraFieldsInMetaData(telephoneChargeRequest), - gatewayAccount, - telephoneChargeRequest.getProviderId(), - SupportedLanguage.ENGLISH, - CARD_EXTERNAL_TELEPHONE - ); - + ChargeEntity chargeEntity = aTelephoneChargeEntity() + .withAmount(telephoneChargeRequest.getAmount()) + .withDescription(telephoneChargeRequest.getDescription()) + .withReference(ServicePaymentReference.of(telephoneChargeRequest.getReference())) + .withGatewayAccount(gatewayAccount) + .withEmail(telephoneChargeRequest.getEmailAddress().orElse(null)) + .withExternalMetadata(storeExtraFieldsInMetaData(telephoneChargeRequest)) + .withGatewayTransactionId(telephoneChargeRequest.getProviderId()) + .withCardDetails(cardDetails) + .build(); + chargeDao.persist(chargeEntity); transitionChargeState(chargeEntity, PAYMENT_NOTIFICATION_CREATED); transitionChargeState(chargeEntity, internalChargeStatus(telephoneChargeRequest.getPaymentOutcome().getCode().orElse(null))); @@ -209,17 +206,20 @@ private Optional createCharge(ChargeCreateRequest chargeRequest, L ? chargeRequest.getLanguage() : SupportedLanguage.ENGLISH; - ChargeEntity chargeEntity = new ChargeEntity( - chargeRequest.getAmount(), - chargeRequest.getReturnUrl(), - chargeRequest.getDescription(), - ServicePaymentReference.of(chargeRequest.getReference()), - gatewayAccount, - chargeRequest.getEmail(), - language, - chargeRequest.isDelayedCapture(), - chargeRequest.getExternalMetadata().orElse(null), - chargeRequest.getSource()); + + + ChargeEntity chargeEntity = aWebChargeEntity() + .withAmount(chargeRequest.getAmount()) + .withReturnUrl(chargeRequest.getReturnUrl()) + .withDescription(chargeRequest.getDescription()) + .withReference(ServicePaymentReference.of(chargeRequest.getReference())) + .withGatewayAccount(gatewayAccount) + .withEmail(chargeRequest.getEmail()) + .withLanguage(language) + .withDelayedCapture(chargeRequest.isDelayedCapture()) + .withExternalMetadata(chargeRequest.getExternalMetadata().orElse(null)) + .withSource(chargeRequest.getSource()) + .build(); chargeRequest.getPrefilledCardHolderDetails() .map(this::createCardDetailsEntity) @@ -772,7 +772,7 @@ private ExternalMetadata storeExtraFieldsInMetaData(TelephoneChargeCreateRequest return new ExternalMetadata(telephoneJSON); } - + private String checkAndGetTruncatedValue(String processorId, String field, String value) { if (value.length() > 50) { logger.info("Telephone payment {} - {} field is longer than 50 characters and has been truncated and stored. Actual value is {}", processorId, field, value); diff --git a/src/test/java/uk/gov/pay/connector/model/domain/ChargeEntityFixture.java b/src/test/java/uk/gov/pay/connector/charge/model/domain/ChargeEntityFixture.java similarity index 90% rename from src/test/java/uk/gov/pay/connector/model/domain/ChargeEntityFixture.java rename to src/test/java/uk/gov/pay/connector/charge/model/domain/ChargeEntityFixture.java index 8472e56b66..d561fc989f 100644 --- a/src/test/java/uk/gov/pay/connector/model/domain/ChargeEntityFixture.java +++ b/src/test/java/uk/gov/pay/connector/charge/model/domain/ChargeEntityFixture.java @@ -1,4 +1,4 @@ -package uk.gov.pay.connector.model.domain; +package uk.gov.pay.connector.charge.model.domain; import com.google.common.collect.ImmutableMap; import uk.gov.pay.commons.model.Source; @@ -7,11 +7,6 @@ import uk.gov.pay.connector.cardtype.model.domain.CardBrandLabelEntity; import uk.gov.pay.connector.charge.model.CardDetailsEntity; import uk.gov.pay.connector.charge.model.ServicePaymentReference; -import uk.gov.pay.connector.charge.model.domain.Auth3dsDetailsEntity; -import uk.gov.pay.connector.charge.model.domain.ChargeEntity; -import uk.gov.pay.connector.charge.model.domain.ChargeStatus; -import uk.gov.pay.connector.charge.model.domain.FeeEntity; -import uk.gov.pay.connector.charge.model.domain.ParityCheckStatus; import uk.gov.pay.connector.chargeevent.model.domain.ChargeEventEntity; import uk.gov.pay.connector.gatewayaccount.model.GatewayAccountEntity; import uk.gov.pay.connector.refund.model.domain.RefundEntity; @@ -62,36 +57,43 @@ public static ChargeEntityFixture aValidChargeEntity() { } public ChargeEntity build() { - ChargeEntity chargeEntity = new ChargeEntity(amount, status, returnUrl, description, reference, - gatewayAccountEntity, email, createdDate, language, delayedCapture, externalMetadata, source); + if (gatewayTransactionId == null) { + gatewayTransactionId = transactionId; + } + + ChargeEntity chargeEntity = new ChargeEntity(amount, + status, + returnUrl, + description, + reference, + gatewayAccountEntity, + email, + createdDate, + language, + delayedCapture, + externalMetadata, + source, + gatewayTransactionId, + cardDetails); chargeEntity.setId(id); chargeEntity.setExternalId(externalId); - chargeEntity.setGatewayTransactionId(transactionId); chargeEntity.setCorporateSurcharge(corporateSurcharge); chargeEntity.getEvents().addAll(events); chargeEntity.getRefunds().addAll(refunds); chargeEntity.setProviderSessionId(providerSessionId); chargeEntity.set3dsDetails(auth3dsDetailsEntity); chargeEntity.setSource(source); - - if (gatewayTransactionId != null) { - chargeEntity.setGatewayTransactionId(gatewayTransactionId); - } + chargeEntity.setWalletType(walletType); if (this.fee != null) { FeeEntity fee = new FeeEntity(chargeEntity, this.fee); chargeEntity.setFee(fee); } - if (cardDetails != null) { - chargeEntity.setCardDetails(cardDetails); - } - if (parityCheckStatus != null) { chargeEntity.updateParityCheck(parityCheckStatus); } - chargeEntity.setWalletType(walletType); return chargeEntity; } diff --git a/src/test/java/uk/gov/pay/connector/charge/service/ChargeCancelServiceTest.java b/src/test/java/uk/gov/pay/connector/charge/service/ChargeCancelServiceTest.java index 946afea24f..9a396c4814 100644 --- a/src/test/java/uk/gov/pay/connector/charge/service/ChargeCancelServiceTest.java +++ b/src/test/java/uk/gov/pay/connector/charge/service/ChargeCancelServiceTest.java @@ -42,7 +42,7 @@ import static uk.gov.pay.connector.charge.model.domain.ChargeStatus.SYSTEM_CANCELLED; import static uk.gov.pay.connector.charge.model.domain.ChargeStatus.USER_CANCELLED; import static uk.gov.pay.connector.gateway.model.response.GatewayResponse.GatewayResponseBuilder.responseBuilder; -import static uk.gov.pay.connector.model.domain.ChargeEntityFixture.aValidChargeEntity; +import static uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture.aValidChargeEntity; @RunWith(JUnitParamsRunner.class) public class ChargeCancelServiceTest { diff --git a/src/test/java/uk/gov/pay/connector/charge/service/ChargeExpiryServiceTest.java b/src/test/java/uk/gov/pay/connector/charge/service/ChargeExpiryServiceTest.java index 8f9b7aa08a..d10b7e3e54 100644 --- a/src/test/java/uk/gov/pay/connector/charge/service/ChargeExpiryServiceTest.java +++ b/src/test/java/uk/gov/pay/connector/charge/service/ChargeExpiryServiceTest.java @@ -28,7 +28,7 @@ import uk.gov.pay.connector.gateway.model.response.GatewayResponse.GatewayResponseBuilder; import uk.gov.pay.connector.gateway.worldpay.WorldpayCancelResponse; import uk.gov.pay.connector.gatewayaccount.model.GatewayAccountEntity; -import uk.gov.pay.connector.model.domain.ChargeEntityFixture; +import uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture; import uk.gov.pay.connector.paymentprocessor.service.QueryService; import uk.gov.pay.connector.token.dao.TokenDao; diff --git a/src/test/java/uk/gov/pay/connector/charge/service/ChargeServiceTest.java b/src/test/java/uk/gov/pay/connector/charge/service/ChargeServiceTest.java index e2701900d3..ad7c99ef31 100644 --- a/src/test/java/uk/gov/pay/connector/charge/service/ChargeServiceTest.java +++ b/src/test/java/uk/gov/pay/connector/charge/service/ChargeServiceTest.java @@ -32,6 +32,7 @@ import uk.gov.pay.connector.charge.model.PrefilledCardHolderDetails; import uk.gov.pay.connector.charge.model.ServicePaymentReference; import uk.gov.pay.connector.charge.model.domain.ChargeEntity; +import uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture; import uk.gov.pay.connector.charge.model.domain.ChargeStatus; import uk.gov.pay.connector.charge.model.telephone.PaymentOutcome; import uk.gov.pay.connector.charge.model.telephone.Supplemental; @@ -51,7 +52,6 @@ import uk.gov.pay.connector.gateway.model.AuthCardDetails; import uk.gov.pay.connector.gatewayaccount.dao.GatewayAccountDao; import uk.gov.pay.connector.gatewayaccount.model.GatewayAccountEntity; -import uk.gov.pay.connector.model.domain.ChargeEntityFixture; import uk.gov.pay.connector.queue.StateTransitionService; import uk.gov.pay.connector.token.dao.TokenDao; import uk.gov.pay.connector.token.model.domain.TokenEntity; @@ -94,6 +94,7 @@ import static uk.gov.pay.commons.model.Source.CARD_EXTERNAL_TELEPHONE; import static uk.gov.pay.connector.charge.model.ChargeResponse.ChargeResponseBuilder; import static uk.gov.pay.connector.charge.model.ChargeResponse.aChargeResponseBuilder; +import static uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture.aValidChargeEntity; import static uk.gov.pay.connector.charge.model.domain.ChargeStatus.AUTHORISATION_READY; import static uk.gov.pay.connector.charge.model.domain.ChargeStatus.AUTHORISATION_SUCCESS; import static uk.gov.pay.connector.charge.model.domain.ChargeStatus.AWAITING_CAPTURE_REQUEST; @@ -102,7 +103,6 @@ import static uk.gov.pay.connector.charge.model.domain.ChargeStatus.ENTERING_CARD_DETAILS; import static uk.gov.pay.connector.common.model.api.ExternalChargeRefundAvailability.EXTERNAL_AVAILABLE; import static uk.gov.pay.connector.gatewayaccount.model.GatewayAccountEntity.Type.TEST; -import static uk.gov.pay.connector.model.domain.ChargeEntityFixture.aValidChargeEntity; @RunWith(MockitoJUnitRunner.class) public class ChargeServiceTest { @@ -117,7 +117,7 @@ public class ChargeServiceTest { private ChargeCreateRequestBuilder requestBuilder; private TelephoneChargeCreateRequest.Builder telephoneRequestBuilder; - + @Rule public ExpectedException thrown = ExpectedException.none(); @@ -206,19 +206,18 @@ public void setUp() { CardType.valueOf("DEBIT") ); - returnedChargeEntity = new ChargeEntity( - 100L, - ServicePaymentReference.of("Some reference"), - "Some description", - AUTHORISATION_SUCCESS, - "jane.doe@example.com", - cardDetails, - externalMetadata, - gatewayAccount, - "1PROV", - SupportedLanguage.ENGLISH, - CARD_API - ); + returnedChargeEntity = aValidChargeEntity() + .withAmount(100L) + .withDescription("Some description") + .withReference(ServicePaymentReference.of("Some reference")) + .withGatewayAccountEntity(gatewayAccount) + .withEmail("jane.doe@example.com") + .withExternalMetadata(externalMetadata) + .withSource(CARD_API) + .withStatus(AUTHORISATION_SUCCESS) + .withGatewayTransactionId("1PROV") + .withCardDetails(cardDetails) + .build(); when(mockedChargeDao.findByGatewayTransactionId("1PROV")).thenReturn(Optional.of(returnedChargeEntity)); when(mockedChargeDao.findByGatewayTransactionId("new")).thenReturn(Optional.empty()); @@ -669,7 +668,7 @@ public void shouldCreateATelephoneChargeForFailureCodeOfP0050() { assertThat(createdChargeEntity.getExternalMetadata().get().getMetadata(), equalTo(metadata)); assertThat(createdChargeEntity.getLanguage(), is(SupportedLanguage.ENGLISH)); } - + @Test public void shouldCreateATelephoneChargeAndTruncateMetaDataOver50Characters() { String stringGreaterThan50 = StringUtils.repeat("*", 51); @@ -850,7 +849,7 @@ public void shouldReturnAResponseForExistingCharge() { assertThat(telephoneChargeResponse.get().getChargeId().length(), is(26)); assertThat(telephoneChargeResponse.get().getState().getStatus(), is("success")); assertThat(telephoneChargeResponse.get().getState().isFinished(), is(true)); - + } @Test @@ -1229,13 +1228,13 @@ public void shouldOfferPaymentStateTransition() { public void updateChargeAndEmitEventPostAuthorisation_shouldEmitEvent() { ChargeEntity chargeSpy = spy(ChargeEntityFixture.aValidChargeEntity().build()); ChargeEventEntity chargeEvent = mock(ChargeEventEntity.class); - + when(chargeEvent.getStatus()).thenReturn(ENTERING_CARD_DETAILS); when(chargeEvent.getUpdated()).thenReturn(now()); when(mockedChargeEventDao.persistChargeEventOf(chargeSpy, null)).thenReturn(chargeEvent); when(mockedChargeDao.findByExternalId(chargeSpy.getExternalId())).thenReturn(Optional.of(chargeSpy)); when(chargeSpy.getEvents()).thenReturn(List.of(chargeEvent)); - + AuthCardDetails authCardDetails = new AuthCardDetails(); authCardDetails.setCardNo("1234567890"); service.updateChargeAndEmitEventPostAuthorisation(chargeSpy.getExternalId(), ENTERING_CARD_DETAILS, diff --git a/src/test/java/uk/gov/pay/connector/charge/service/Worldpay3dsFlexJwtServiceTest.java b/src/test/java/uk/gov/pay/connector/charge/service/Worldpay3dsFlexJwtServiceTest.java index ed48655371..68e24080d4 100644 --- a/src/test/java/uk/gov/pay/connector/charge/service/Worldpay3dsFlexJwtServiceTest.java +++ b/src/test/java/uk/gov/pay/connector/charge/service/Worldpay3dsFlexJwtServiceTest.java @@ -24,7 +24,7 @@ import uk.gov.pay.connector.gatewayaccount.model.GatewayAccountEntity; import uk.gov.pay.connector.gatewayaccount.model.Worldpay3dsFlexCredentials; import uk.gov.pay.connector.gatewayaccount.model.Worldpay3dsFlexCredentialsEntity; -import uk.gov.pay.connector.model.domain.ChargeEntityFixture; +import uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture; import javax.crypto.spec.SecretKeySpec; import java.time.Instant; diff --git a/src/test/java/uk/gov/pay/connector/charge/util/CorporateCardSurchargeCalculatorTest.java b/src/test/java/uk/gov/pay/connector/charge/util/CorporateCardSurchargeCalculatorTest.java index 9f239a51b5..311a7ab0e7 100644 --- a/src/test/java/uk/gov/pay/connector/charge/util/CorporateCardSurchargeCalculatorTest.java +++ b/src/test/java/uk/gov/pay/connector/charge/util/CorporateCardSurchargeCalculatorTest.java @@ -7,7 +7,7 @@ import uk.gov.pay.connector.gateway.model.PayersCardType; import uk.gov.pay.connector.gatewayaccount.model.GatewayAccountEntity; import uk.gov.pay.connector.model.domain.AuthCardDetailsFixture; -import uk.gov.pay.connector.model.domain.ChargeEntityFixture; +import uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture; import java.util.Optional; diff --git a/src/test/java/uk/gov/pay/connector/charge/util/FixedCorporateCardSurchargeCalculatorTest.java b/src/test/java/uk/gov/pay/connector/charge/util/FixedCorporateCardSurchargeCalculatorTest.java index cf02c212a5..fa539ec1c9 100644 --- a/src/test/java/uk/gov/pay/connector/charge/util/FixedCorporateCardSurchargeCalculatorTest.java +++ b/src/test/java/uk/gov/pay/connector/charge/util/FixedCorporateCardSurchargeCalculatorTest.java @@ -8,7 +8,7 @@ import uk.gov.pay.connector.gateway.model.PayersCardType; import uk.gov.pay.connector.gatewayaccount.model.GatewayAccountEntity; import uk.gov.pay.connector.model.domain.AuthCardDetailsFixture; -import uk.gov.pay.connector.model.domain.ChargeEntityFixture; +import uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.is; diff --git a/src/test/java/uk/gov/pay/connector/charge/util/RefundCalculatorTest.java b/src/test/java/uk/gov/pay/connector/charge/util/RefundCalculatorTest.java index 7f60a38e94..b6e3c53a9f 100644 --- a/src/test/java/uk/gov/pay/connector/charge/util/RefundCalculatorTest.java +++ b/src/test/java/uk/gov/pay/connector/charge/util/RefundCalculatorTest.java @@ -2,7 +2,7 @@ import org.junit.Test; import uk.gov.pay.connector.charge.model.domain.ChargeEntity; -import uk.gov.pay.connector.model.domain.ChargeEntityFixture; +import uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture; import uk.gov.pay.connector.model.domain.RefundEntityFixture; import uk.gov.pay.connector.refund.model.domain.RefundEntity; import uk.gov.pay.connector.refund.model.domain.RefundStatus; diff --git a/src/test/java/uk/gov/pay/connector/events/EmittedEventsBackfillServiceTest.java b/src/test/java/uk/gov/pay/connector/events/EmittedEventsBackfillServiceTest.java index a596c258d2..0fbbd5e42c 100644 --- a/src/test/java/uk/gov/pay/connector/events/EmittedEventsBackfillServiceTest.java +++ b/src/test/java/uk/gov/pay/connector/events/EmittedEventsBackfillServiceTest.java @@ -20,7 +20,7 @@ import uk.gov.pay.connector.charge.service.ChargeService; import uk.gov.pay.connector.chargeevent.model.domain.ChargeEventEntity; import uk.gov.pay.connector.events.dao.EmittedEventDao; -import uk.gov.pay.connector.model.domain.ChargeEntityFixture; +import uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture; import uk.gov.pay.connector.pact.ChargeEventEntityFixture; import uk.gov.pay.connector.queue.StateTransitionService; import uk.gov.pay.connector.refund.dao.RefundDao; diff --git a/src/test/java/uk/gov/pay/connector/events/model/charge/CaptureConfirmedTest.java b/src/test/java/uk/gov/pay/connector/events/model/charge/CaptureConfirmedTest.java index 160d917839..5dce3c67d4 100644 --- a/src/test/java/uk/gov/pay/connector/events/model/charge/CaptureConfirmedTest.java +++ b/src/test/java/uk/gov/pay/connector/events/model/charge/CaptureConfirmedTest.java @@ -3,7 +3,7 @@ import com.fasterxml.jackson.core.JsonProcessingException; import org.junit.Test; import uk.gov.pay.connector.chargeevent.model.domain.ChargeEventEntity; -import uk.gov.pay.connector.model.domain.ChargeEntityFixture; +import uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture; import java.time.ZonedDateTime; import java.util.Optional; @@ -14,7 +14,7 @@ import static org.hamcrest.core.IsEqual.equalTo; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -import static uk.gov.pay.connector.model.domain.ChargeEntityFixture.aValidChargeEntity; +import static uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture.aValidChargeEntity; public class CaptureConfirmedTest { diff --git a/src/test/java/uk/gov/pay/connector/events/model/charge/CaptureSubmittedTest.java b/src/test/java/uk/gov/pay/connector/events/model/charge/CaptureSubmittedTest.java index 523b79e9e1..8c06c0f6f1 100644 --- a/src/test/java/uk/gov/pay/connector/events/model/charge/CaptureSubmittedTest.java +++ b/src/test/java/uk/gov/pay/connector/events/model/charge/CaptureSubmittedTest.java @@ -3,7 +3,7 @@ import com.fasterxml.jackson.core.JsonProcessingException; import org.junit.Test; import uk.gov.pay.connector.chargeevent.model.domain.ChargeEventEntity; -import uk.gov.pay.connector.model.domain.ChargeEntityFixture; +import uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture; import java.time.ZonedDateTime; @@ -12,7 +12,7 @@ import static org.hamcrest.core.IsEqual.equalTo; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -import static uk.gov.pay.connector.model.domain.ChargeEntityFixture.aValidChargeEntity; +import static uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture.aValidChargeEntity; public class CaptureSubmittedTest { private final ChargeEntityFixture chargeEntity = aValidChargeEntity(); diff --git a/src/test/java/uk/gov/pay/connector/events/model/charge/PaymentCreatedTest.java b/src/test/java/uk/gov/pay/connector/events/model/charge/PaymentCreatedTest.java index 2d5585ca11..18bc4956e9 100644 --- a/src/test/java/uk/gov/pay/connector/events/model/charge/PaymentCreatedTest.java +++ b/src/test/java/uk/gov/pay/connector/events/model/charge/PaymentCreatedTest.java @@ -12,7 +12,7 @@ import uk.gov.pay.connector.charge.model.domain.ChargeEntity; import uk.gov.pay.connector.charge.model.domain.ChargeStatus; import uk.gov.pay.connector.chargeevent.model.domain.ChargeEventEntity; -import uk.gov.pay.connector.model.domain.ChargeEntityFixture; +import uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture; import java.time.ZonedDateTime; import java.util.List; diff --git a/src/test/java/uk/gov/pay/connector/events/model/charge/PaymentDetailsEnteredTest.java b/src/test/java/uk/gov/pay/connector/events/model/charge/PaymentDetailsEnteredTest.java index c0fe0fc9a2..7b57aa9089 100644 --- a/src/test/java/uk/gov/pay/connector/events/model/charge/PaymentDetailsEnteredTest.java +++ b/src/test/java/uk/gov/pay/connector/events/model/charge/PaymentDetailsEnteredTest.java @@ -7,7 +7,7 @@ import uk.gov.pay.connector.charge.model.domain.ChargeStatus; import uk.gov.pay.connector.chargeevent.model.domain.ChargeEventEntity; import uk.gov.pay.connector.gateway.model.PayersCardType; -import uk.gov.pay.connector.model.domain.ChargeEntityFixture; +import uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture; import uk.gov.pay.connector.wallets.WalletType; import java.time.ZonedDateTime; diff --git a/src/test/java/uk/gov/pay/connector/events/model/charge/PaymentNotificationCreatedTest.java b/src/test/java/uk/gov/pay/connector/events/model/charge/PaymentNotificationCreatedTest.java index b18b119763..cab8f2a3e8 100644 --- a/src/test/java/uk/gov/pay/connector/events/model/charge/PaymentNotificationCreatedTest.java +++ b/src/test/java/uk/gov/pay/connector/events/model/charge/PaymentNotificationCreatedTest.java @@ -7,7 +7,7 @@ import uk.gov.pay.connector.charge.model.domain.ChargeEntity; import uk.gov.pay.connector.charge.model.domain.ChargeStatus; import uk.gov.pay.connector.chargeevent.model.domain.ChargeEventEntity; -import uk.gov.pay.connector.model.domain.ChargeEntityFixture; +import uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture; import java.time.ZonedDateTime; import java.util.Map; diff --git a/src/test/java/uk/gov/pay/connector/events/model/charge/RefundAvailabilityUpdatedTest.java b/src/test/java/uk/gov/pay/connector/events/model/charge/RefundAvailabilityUpdatedTest.java index d69c3a4d92..c1ccea23fa 100644 --- a/src/test/java/uk/gov/pay/connector/events/model/charge/RefundAvailabilityUpdatedTest.java +++ b/src/test/java/uk/gov/pay/connector/events/model/charge/RefundAvailabilityUpdatedTest.java @@ -5,14 +5,14 @@ import uk.gov.pay.connector.charge.model.domain.ChargeEntity; import uk.gov.pay.connector.common.model.api.ExternalChargeRefundAvailability; import uk.gov.pay.connector.events.eventdetails.charge.RefundAvailabilityUpdatedEventDetails; -import uk.gov.pay.connector.model.domain.ChargeEntityFixture; +import uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture; import java.time.ZonedDateTime; import static com.jayway.jsonpath.matchers.JsonPathMatchers.hasJsonPath; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.core.IsEqual.equalTo; -import static uk.gov.pay.connector.model.domain.ChargeEntityFixture.aValidChargeEntity; +import static uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture.aValidChargeEntity; public class RefundAvailabilityUpdatedTest { private final ChargeEntityFixture chargeEntity = aValidChargeEntity(); diff --git a/src/test/java/uk/gov/pay/connector/events/model/refund/EventFactoryTest.java b/src/test/java/uk/gov/pay/connector/events/model/refund/EventFactoryTest.java index 73f7ac4d77..01f3d2fd22 100644 --- a/src/test/java/uk/gov/pay/connector/events/model/refund/EventFactoryTest.java +++ b/src/test/java/uk/gov/pay/connector/events/model/refund/EventFactoryTest.java @@ -33,7 +33,7 @@ import uk.gov.pay.connector.gateway.PaymentProvider; import uk.gov.pay.connector.gateway.PaymentProviders; import uk.gov.pay.connector.gateway.sandbox.SandboxPaymentProvider; -import uk.gov.pay.connector.model.domain.ChargeEntityFixture; +import uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture; import uk.gov.pay.connector.pact.ChargeEventEntityFixture; import uk.gov.pay.connector.pact.RefundHistoryEntityFixture; import uk.gov.pay.connector.queue.PaymentStateTransition; diff --git a/src/test/java/uk/gov/pay/connector/events/model/refund/RefundCreatedByServiceTest.java b/src/test/java/uk/gov/pay/connector/events/model/refund/RefundCreatedByServiceTest.java index eaa99c55dd..adafd563ef 100644 --- a/src/test/java/uk/gov/pay/connector/events/model/refund/RefundCreatedByServiceTest.java +++ b/src/test/java/uk/gov/pay/connector/events/model/refund/RefundCreatedByServiceTest.java @@ -4,7 +4,7 @@ import uk.gov.pay.connector.charge.model.domain.ChargeEntity; import uk.gov.pay.connector.common.model.domain.UTCDateTimeConverter; import uk.gov.pay.connector.events.eventdetails.refund.RefundCreatedByServiceEventDetails; -import uk.gov.pay.connector.model.domain.ChargeEntityFixture; +import uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture; import uk.gov.pay.connector.refund.model.domain.RefundHistory; import uk.gov.pay.connector.refund.model.domain.RefundStatus; diff --git a/src/test/java/uk/gov/pay/connector/events/model/refund/RefundCreatedByUserTest.java b/src/test/java/uk/gov/pay/connector/events/model/refund/RefundCreatedByUserTest.java index 14922ce390..84fe6a34c3 100644 --- a/src/test/java/uk/gov/pay/connector/events/model/refund/RefundCreatedByUserTest.java +++ b/src/test/java/uk/gov/pay/connector/events/model/refund/RefundCreatedByUserTest.java @@ -4,7 +4,7 @@ import uk.gov.pay.connector.charge.model.domain.ChargeEntity; import uk.gov.pay.connector.common.model.domain.UTCDateTimeConverter; import uk.gov.pay.connector.events.eventdetails.refund.RefundCreatedByUserEventDetails; -import uk.gov.pay.connector.model.domain.ChargeEntityFixture; +import uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture; import uk.gov.pay.connector.refund.model.domain.RefundHistory; import uk.gov.pay.connector.refund.model.domain.RefundStatus; diff --git a/src/test/java/uk/gov/pay/connector/gateway/epdq/BaseEpdqPaymentProviderTest.java b/src/test/java/uk/gov/pay/connector/gateway/epdq/BaseEpdqPaymentProviderTest.java index 02b0810253..ca34ffabd8 100644 --- a/src/test/java/uk/gov/pay/connector/gateway/epdq/BaseEpdqPaymentProviderTest.java +++ b/src/test/java/uk/gov/pay/connector/gateway/epdq/BaseEpdqPaymentProviderTest.java @@ -51,7 +51,7 @@ import static uk.gov.pay.connector.gatewayaccount.model.GatewayAccount.CREDENTIALS_SHA_IN_PASSPHRASE; import static uk.gov.pay.connector.gatewayaccount.model.GatewayAccount.CREDENTIALS_USERNAME; import static uk.gov.pay.connector.gatewayaccount.model.GatewayAccountEntity.Type.TEST; -import static uk.gov.pay.connector.model.domain.ChargeEntityFixture.aValidChargeEntity; +import static uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture.aValidChargeEntity; import static uk.gov.pay.connector.model.domain.RefundEntityFixture.userEmail; import static uk.gov.pay.connector.model.domain.RefundEntityFixture.userExternalId; import static uk.gov.pay.connector.util.TestTemplateResourceLoader.EPDQ_AUTHORISATION_ERROR_RESPONSE; diff --git a/src/test/java/uk/gov/pay/connector/gateway/epdq/EpdqCaptureHandlerTest.java b/src/test/java/uk/gov/pay/connector/gateway/epdq/EpdqCaptureHandlerTest.java index 6387af4773..8d3e306466 100644 --- a/src/test/java/uk/gov/pay/connector/gateway/epdq/EpdqCaptureHandlerTest.java +++ b/src/test/java/uk/gov/pay/connector/gateway/epdq/EpdqCaptureHandlerTest.java @@ -31,7 +31,7 @@ import static uk.gov.pay.connector.gatewayaccount.model.GatewayAccount.CREDENTIALS_SHA_IN_PASSPHRASE; import static uk.gov.pay.connector.gatewayaccount.model.GatewayAccount.CREDENTIALS_USERNAME; import static uk.gov.pay.connector.gatewayaccount.model.GatewayAccountEntity.Type.TEST; -import static uk.gov.pay.connector.model.domain.ChargeEntityFixture.aValidChargeEntity; +import static uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture.aValidChargeEntity; import static uk.gov.pay.connector.util.TestTemplateResourceLoader.load; @RunWith(MockitoJUnitRunner.class) diff --git a/src/test/java/uk/gov/pay/connector/gateway/model/request/CardAuthorisationGatewayRequestTest.java b/src/test/java/uk/gov/pay/connector/gateway/model/request/CardAuthorisationGatewayRequestTest.java index de1a3eed65..45663fdd81 100644 --- a/src/test/java/uk/gov/pay/connector/gateway/model/request/CardAuthorisationGatewayRequestTest.java +++ b/src/test/java/uk/gov/pay/connector/gateway/model/request/CardAuthorisationGatewayRequestTest.java @@ -3,7 +3,7 @@ import org.junit.Test; import uk.gov.pay.connector.charge.model.domain.ChargeEntity; -import uk.gov.pay.connector.model.domain.ChargeEntityFixture; +import uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; diff --git a/src/test/java/uk/gov/pay/connector/gateway/sandbox/SandboxPaymentProviderTest.java b/src/test/java/uk/gov/pay/connector/gateway/sandbox/SandboxPaymentProviderTest.java index e9f1c64974..d083cc1fe8 100644 --- a/src/test/java/uk/gov/pay/connector/gateway/sandbox/SandboxPaymentProviderTest.java +++ b/src/test/java/uk/gov/pay/connector/gateway/sandbox/SandboxPaymentProviderTest.java @@ -16,7 +16,7 @@ import uk.gov.pay.connector.gateway.model.response.BaseCancelResponse; import uk.gov.pay.connector.gateway.model.response.GatewayRefundResponse; import uk.gov.pay.connector.gateway.model.response.GatewayResponse; -import uk.gov.pay.connector.model.domain.ChargeEntityFixture; +import uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture; import uk.gov.pay.connector.model.domain.RefundEntityFixture; import static org.hamcrest.CoreMatchers.instanceOf; diff --git a/src/test/java/uk/gov/pay/connector/gateway/sandbox/applepay/SandboxWalletAuthorisationHandlerTest.java b/src/test/java/uk/gov/pay/connector/gateway/sandbox/applepay/SandboxWalletAuthorisationHandlerTest.java index dac8681afa..abe8a4f4e1 100644 --- a/src/test/java/uk/gov/pay/connector/gateway/sandbox/applepay/SandboxWalletAuthorisationHandlerTest.java +++ b/src/test/java/uk/gov/pay/connector/gateway/sandbox/applepay/SandboxWalletAuthorisationHandlerTest.java @@ -5,7 +5,7 @@ import uk.gov.pay.connector.gateway.model.GatewayError; import uk.gov.pay.connector.gateway.model.response.BaseAuthoriseResponse; import uk.gov.pay.connector.gateway.model.response.GatewayResponse; -import uk.gov.pay.connector.model.domain.ChargeEntityFixture; +import uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture; import uk.gov.pay.connector.wallets.WalletAuthorisationGatewayRequest; import uk.gov.pay.connector.wallets.applepay.AppleDecryptedPaymentData; diff --git a/src/test/java/uk/gov/pay/connector/gateway/smartpay/SmartpayCaptureHandlerTest.java b/src/test/java/uk/gov/pay/connector/gateway/smartpay/SmartpayCaptureHandlerTest.java index 2ce314f0de..00e30001b7 100644 --- a/src/test/java/uk/gov/pay/connector/gateway/smartpay/SmartpayCaptureHandlerTest.java +++ b/src/test/java/uk/gov/pay/connector/gateway/smartpay/SmartpayCaptureHandlerTest.java @@ -36,7 +36,7 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import static uk.gov.pay.connector.gatewayaccount.model.GatewayAccountEntity.Type.TEST; -import static uk.gov.pay.connector.model.domain.ChargeEntityFixture.aValidChargeEntity; +import static uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture.aValidChargeEntity; import static uk.gov.pay.connector.util.TestTemplateResourceLoader.SMARTPAY_CAPTURE_SUCCESS_RESPONSE; @RunWith(JUnitParamsRunner.class) diff --git a/src/test/java/uk/gov/pay/connector/gateway/smartpay/SmartpayPaymentProviderTest.java b/src/test/java/uk/gov/pay/connector/gateway/smartpay/SmartpayPaymentProviderTest.java index ed0db9b545..6aba7e0e06 100644 --- a/src/test/java/uk/gov/pay/connector/gateway/smartpay/SmartpayPaymentProviderTest.java +++ b/src/test/java/uk/gov/pay/connector/gateway/smartpay/SmartpayPaymentProviderTest.java @@ -22,7 +22,7 @@ import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; import static uk.gov.pay.connector.gateway.model.response.BaseAuthoriseResponse.AuthoriseStatus.REQUIRES_3DS; -import static uk.gov.pay.connector.model.domain.ChargeEntityFixture.aValidChargeEntity; +import static uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture.aValidChargeEntity; import static uk.gov.pay.connector.util.TestTemplateResourceLoader.SMARTPAY_3DS_AUTHORISATION_SUCCESS_RESPONSE; import static uk.gov.pay.connector.util.TestTemplateResourceLoader.SMARTPAY_AUTHORISATION_3DS_REQUIRED_RESPONSE; import static uk.gov.pay.connector.util.TestTemplateResourceLoader.SMARTPAY_AUTHORISATION_SUCCESS_RESPONSE; diff --git a/src/test/java/uk/gov/pay/connector/gateway/stripe/StripeCancelHandlerTest.java b/src/test/java/uk/gov/pay/connector/gateway/stripe/StripeCancelHandlerTest.java index 67a8b88f09..71490298e6 100644 --- a/src/test/java/uk/gov/pay/connector/gateway/stripe/StripeCancelHandlerTest.java +++ b/src/test/java/uk/gov/pay/connector/gateway/stripe/StripeCancelHandlerTest.java @@ -30,7 +30,7 @@ import static org.mockito.Mockito.when; import static uk.gov.pay.connector.gateway.model.ErrorType.GATEWAY_ERROR; import static uk.gov.pay.connector.gatewayaccount.model.GatewayAccountEntity.Type.TEST; -import static uk.gov.pay.connector.model.domain.ChargeEntityFixture.aValidChargeEntity; +import static uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture.aValidChargeEntity; import static uk.gov.pay.connector.util.TestTemplateResourceLoader.STRIPE_ERROR_RESPONSE; import static uk.gov.pay.connector.util.TestTemplateResourceLoader.load; diff --git a/src/test/java/uk/gov/pay/connector/gateway/stripe/StripeCaptureHandlerTest.java b/src/test/java/uk/gov/pay/connector/gateway/stripe/StripeCaptureHandlerTest.java index 947bf306ed..5613e723cc 100644 --- a/src/test/java/uk/gov/pay/connector/gateway/stripe/StripeCaptureHandlerTest.java +++ b/src/test/java/uk/gov/pay/connector/gateway/stripe/StripeCaptureHandlerTest.java @@ -30,14 +30,12 @@ import static org.junit.Assert.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import static uk.gov.pay.connector.gateway.model.ErrorType.GATEWAY_ERROR; import static uk.gov.pay.connector.gatewayaccount.model.GatewayAccountEntity.Type.TEST; -import static uk.gov.pay.connector.model.domain.ChargeEntityFixture.aValidChargeEntity; +import static uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture.aValidChargeEntity; import static uk.gov.pay.connector.util.TestTemplateResourceLoader.STRIPE_CAPTURE_SUCCESS_RESPONSE; -import static uk.gov.pay.connector.util.TestTemplateResourceLoader.STRIPE_CAPTURE_SUCCESS_RESPONSE_DESTINATION_CHARGE; import static uk.gov.pay.connector.util.TestTemplateResourceLoader.STRIPE_ERROR_RESPONSE; import static uk.gov.pay.connector.util.TestTemplateResourceLoader.STRIPE_PAYMENT_INTENT_CAPTURE_SUCCESS_RESPONSE; import static uk.gov.pay.connector.util.TestTemplateResourceLoader.STRIPE_TRANSFER_RESPONSE; diff --git a/src/test/java/uk/gov/pay/connector/gateway/stripe/StripePaymentProviderTest.java b/src/test/java/uk/gov/pay/connector/gateway/stripe/StripePaymentProviderTest.java index 6d40d7b399..99cad2b818 100644 --- a/src/test/java/uk/gov/pay/connector/gateway/stripe/StripePaymentProviderTest.java +++ b/src/test/java/uk/gov/pay/connector/gateway/stripe/StripePaymentProviderTest.java @@ -50,7 +50,7 @@ import static uk.gov.pay.connector.gateway.model.ErrorType.GATEWAY_CONNECTION_TIMEOUT_ERROR; import static uk.gov.pay.connector.gateway.model.ErrorType.GATEWAY_ERROR; import static uk.gov.pay.connector.gatewayaccount.model.GatewayAccountEntity.Type.TEST; -import static uk.gov.pay.connector.model.domain.ChargeEntityFixture.aValidChargeEntity; +import static uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture.aValidChargeEntity; import static uk.gov.pay.connector.util.TestTemplateResourceLoader.STRIPE_ERROR_RESPONSE; import static uk.gov.pay.connector.util.TestTemplateResourceLoader.STRIPE_PAYMENT_INTENT_REQUIRES_3DS_RESPONSE; import static uk.gov.pay.connector.util.TestTemplateResourceLoader.STRIPE_PAYMENT_INTENT_SUCCESS_RESPONSE; diff --git a/src/test/java/uk/gov/pay/connector/gateway/worldpay/WorldpayCaptureHandlerTest.java b/src/test/java/uk/gov/pay/connector/gateway/worldpay/WorldpayCaptureHandlerTest.java index 3ef219a5e2..a3f750c658 100644 --- a/src/test/java/uk/gov/pay/connector/gateway/worldpay/WorldpayCaptureHandlerTest.java +++ b/src/test/java/uk/gov/pay/connector/gateway/worldpay/WorldpayCaptureHandlerTest.java @@ -41,7 +41,7 @@ import static uk.gov.pay.connector.gatewayaccount.model.GatewayAccount.CREDENTIALS_PASSWORD; import static uk.gov.pay.connector.gatewayaccount.model.GatewayAccount.CREDENTIALS_USERNAME; import static uk.gov.pay.connector.gatewayaccount.model.GatewayAccountEntity.Type.TEST; -import static uk.gov.pay.connector.model.domain.ChargeEntityFixture.aValidChargeEntity; +import static uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture.aValidChargeEntity; import static uk.gov.pay.connector.util.TestTemplateResourceLoader.load; @RunWith(JUnitParamsRunner.class) diff --git a/src/test/java/uk/gov/pay/connector/gateway/worldpay/WorldpayPaymentProviderTest.java b/src/test/java/uk/gov/pay/connector/gateway/worldpay/WorldpayPaymentProviderTest.java index 7c53ba4bfd..3b450eb2ba 100644 --- a/src/test/java/uk/gov/pay/connector/gateway/worldpay/WorldpayPaymentProviderTest.java +++ b/src/test/java/uk/gov/pay/connector/gateway/worldpay/WorldpayPaymentProviderTest.java @@ -28,7 +28,7 @@ import uk.gov.pay.connector.gateway.util.AuthUtil; import uk.gov.pay.connector.gatewayaccount.model.GatewayAccountEntity; import uk.gov.pay.connector.model.domain.AuthCardDetailsFixture; -import uk.gov.pay.connector.model.domain.ChargeEntityFixture; +import uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture; import uk.gov.pay.connector.model.domain.RefundEntityFixture; import uk.gov.pay.connector.refund.model.domain.RefundEntity; import uk.gov.pay.connector.util.TestTemplateResourceLoader; @@ -58,7 +58,7 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import static uk.gov.pay.connector.gateway.worldpay.WorldpayPaymentProvider.WORLDPAY_MACHINE_COOKIE_NAME; -import static uk.gov.pay.connector.model.domain.ChargeEntityFixture.aValidChargeEntity; +import static uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture.aValidChargeEntity; import static uk.gov.pay.connector.util.TestTemplateResourceLoader.WORLDPAY_AUTHORISATION_SUCCESS_RESPONSE; import static uk.gov.pay.connector.util.TestTemplateResourceLoader.WORLDPAY_VALID_3DS_FLEX_RESPONSE_AUTH_WORLDPAY_REQUEST; import static uk.gov.pay.connector.util.TestTemplateResourceLoader.WORLDPAY_VALID_3DS_RESPONSE_AUTH_WORLDPAY_REQUEST; diff --git a/src/test/java/uk/gov/pay/connector/gateway/worldpay/wallets/WorldpayWalletAuthorisationHandlerTest.java b/src/test/java/uk/gov/pay/connector/gateway/worldpay/wallets/WorldpayWalletAuthorisationHandlerTest.java index ff05443dc0..c6c7c19d50 100644 --- a/src/test/java/uk/gov/pay/connector/gateway/worldpay/wallets/WorldpayWalletAuthorisationHandlerTest.java +++ b/src/test/java/uk/gov/pay/connector/gateway/worldpay/wallets/WorldpayWalletAuthorisationHandlerTest.java @@ -16,7 +16,7 @@ import uk.gov.pay.connector.gateway.util.AuthUtil; import uk.gov.pay.connector.gateway.worldpay.applepay.WorldpayWalletAuthorisationHandler; import uk.gov.pay.connector.gatewayaccount.model.GatewayAccountEntity; -import uk.gov.pay.connector.model.domain.ChargeEntityFixture; +import uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture; import uk.gov.pay.connector.util.TestTemplateResourceLoader; import uk.gov.pay.connector.wallets.WalletAuthorisationGatewayRequest; import uk.gov.pay.connector.wallets.applepay.AppleDecryptedPaymentData; diff --git a/src/test/java/uk/gov/pay/connector/it/contract/EpdqPaymentProviderTest.java b/src/test/java/uk/gov/pay/connector/it/contract/EpdqPaymentProviderTest.java index 156297a83a..af69c28ad8 100644 --- a/src/test/java/uk/gov/pay/connector/it/contract/EpdqPaymentProviderTest.java +++ b/src/test/java/uk/gov/pay/connector/it/contract/EpdqPaymentProviderTest.java @@ -56,7 +56,7 @@ import static uk.gov.pay.connector.gateway.PaymentGatewayName.EPDQ; import static uk.gov.pay.connector.gateway.model.response.BaseAuthoriseResponse.AuthoriseStatus.REQUIRES_3DS; import static uk.gov.pay.connector.gatewayaccount.model.GatewayAccountEntity.Type.TEST; -import static uk.gov.pay.connector.model.domain.ChargeEntityFixture.aValidChargeEntity; +import static uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture.aValidChargeEntity; import static uk.gov.pay.connector.model.domain.RefundEntityFixture.userEmail; import static uk.gov.pay.connector.model.domain.RefundEntityFixture.userExternalId; import static uk.gov.pay.connector.util.SystemUtils.envOrThrow; diff --git a/src/test/java/uk/gov/pay/connector/it/contract/SmartpayPaymentProviderTest.java b/src/test/java/uk/gov/pay/connector/it/contract/SmartpayPaymentProviderTest.java index 0036031a9d..e4347b3d35 100644 --- a/src/test/java/uk/gov/pay/connector/it/contract/SmartpayPaymentProviderTest.java +++ b/src/test/java/uk/gov/pay/connector/it/contract/SmartpayPaymentProviderTest.java @@ -53,7 +53,7 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import static uk.gov.pay.connector.gatewayaccount.model.GatewayAccountEntity.Type.TEST; -import static uk.gov.pay.connector.model.domain.ChargeEntityFixture.aValidChargeEntity; +import static uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture.aValidChargeEntity; import static uk.gov.pay.connector.model.domain.RefundEntityFixture.userEmail; import static uk.gov.pay.connector.model.domain.RefundEntityFixture.userExternalId; import static uk.gov.pay.connector.util.SystemUtils.envOrThrow; diff --git a/src/test/java/uk/gov/pay/connector/it/contract/StripePaymentProviderTest.java b/src/test/java/uk/gov/pay/connector/it/contract/StripePaymentProviderTest.java index 25e14ca8c8..c0961c66a4 100644 --- a/src/test/java/uk/gov/pay/connector/it/contract/StripePaymentProviderTest.java +++ b/src/test/java/uk/gov/pay/connector/it/contract/StripePaymentProviderTest.java @@ -38,7 +38,7 @@ import static uk.gov.pay.connector.gateway.model.ErrorType.GENERIC_GATEWAY_ERROR; import static uk.gov.pay.connector.gatewayaccount.model.GatewayAccountEntity.Type.TEST; import static uk.gov.pay.connector.model.domain.AuthCardDetailsFixture.anAuthCardDetails; -import static uk.gov.pay.connector.model.domain.ChargeEntityFixture.aValidChargeEntity; +import static uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture.aValidChargeEntity; import static uk.gov.pay.connector.model.domain.RefundEntityFixture.userEmail; /** diff --git a/src/test/java/uk/gov/pay/connector/it/contract/WorldpayPaymentProviderTest.java b/src/test/java/uk/gov/pay/connector/it/contract/WorldpayPaymentProviderTest.java index 4933a61779..81f0f73cfd 100644 --- a/src/test/java/uk/gov/pay/connector/it/contract/WorldpayPaymentProviderTest.java +++ b/src/test/java/uk/gov/pay/connector/it/contract/WorldpayPaymentProviderTest.java @@ -50,7 +50,7 @@ import static org.mockito.Mockito.when; import static uk.gov.pay.connector.gatewayaccount.model.GatewayAccountEntity.Type.TEST; import static uk.gov.pay.connector.model.domain.AuthCardDetailsFixture.anAuthCardDetails; -import static uk.gov.pay.connector.model.domain.ChargeEntityFixture.aValidChargeEntity; +import static uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture.aValidChargeEntity; import static uk.gov.pay.connector.model.domain.RefundEntityFixture.userEmail; import static uk.gov.pay.connector.model.domain.RefundEntityFixture.userExternalId; import static uk.gov.pay.connector.util.SystemUtils.envOrThrow; diff --git a/src/test/java/uk/gov/pay/connector/it/dao/ChargeDaoCardDetailsIT.java b/src/test/java/uk/gov/pay/connector/it/dao/ChargeDaoCardDetailsIT.java index e7aebfe748..235ed2ca16 100644 --- a/src/test/java/uk/gov/pay/connector/it/dao/ChargeDaoCardDetailsIT.java +++ b/src/test/java/uk/gov/pay/connector/it/dao/ChargeDaoCardDetailsIT.java @@ -14,7 +14,7 @@ import uk.gov.pay.connector.gatewayaccount.dao.GatewayAccountDao; import uk.gov.pay.connector.gatewayaccount.model.GatewayAccountEntity; import uk.gov.pay.connector.model.domain.AddressFixture; -import uk.gov.pay.connector.model.domain.ChargeEntityFixture; +import uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture; import java.util.HashMap; import java.util.Map; diff --git a/src/test/java/uk/gov/pay/connector/it/dao/ChargeDaoIT.java b/src/test/java/uk/gov/pay/connector/it/dao/ChargeDaoIT.java index 4c75d74ea7..86a2c6246a 100644 --- a/src/test/java/uk/gov/pay/connector/it/dao/ChargeDaoIT.java +++ b/src/test/java/uk/gov/pay/connector/it/dao/ChargeDaoIT.java @@ -53,7 +53,7 @@ import static uk.gov.pay.connector.charge.model.domain.ChargeStatus.SYSTEM_CANCELLED; import static uk.gov.pay.connector.gatewayaccount.model.GatewayAccountEntity.Type.TEST; import static uk.gov.pay.connector.model.domain.Auth3dsDetailsEntityFixture.anAuth3dsDetailsEntity; -import static uk.gov.pay.connector.model.domain.ChargeEntityFixture.aValidChargeEntity; +import static uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture.aValidChargeEntity; public class ChargeDaoIT extends DaoITestBase { diff --git a/src/test/java/uk/gov/pay/connector/model/RefundResponseTest.java b/src/test/java/uk/gov/pay/connector/model/RefundResponseTest.java index 9e323bfd20..7dffded681 100644 --- a/src/test/java/uk/gov/pay/connector/model/RefundResponseTest.java +++ b/src/test/java/uk/gov/pay/connector/model/RefundResponseTest.java @@ -6,7 +6,7 @@ import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; import uk.gov.pay.connector.charge.model.domain.ChargeEntity; -import uk.gov.pay.connector.model.domain.ChargeEntityFixture; +import uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture; import uk.gov.pay.connector.refund.model.domain.RefundEntity; import uk.gov.pay.connector.model.domain.RefundEntityFixture; import uk.gov.pay.connector.refund.model.domain.RefundStatus; diff --git a/src/test/java/uk/gov/pay/connector/model/domain/ChargeEntityTest.java b/src/test/java/uk/gov/pay/connector/model/domain/ChargeEntityTest.java index d734f093d3..3eb1c5aa97 100644 --- a/src/test/java/uk/gov/pay/connector/model/domain/ChargeEntityTest.java +++ b/src/test/java/uk/gov/pay/connector/model/domain/ChargeEntityTest.java @@ -2,6 +2,7 @@ import org.junit.Test; import uk.gov.pay.connector.charge.model.domain.ChargeEntity; +import uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture; import uk.gov.pay.connector.common.exception.InvalidStateTransitionException; import static org.hamcrest.core.Is.is; @@ -16,7 +17,7 @@ import static uk.gov.pay.connector.common.model.api.ExternalChargeState.EXTERNAL_STARTED; import static uk.gov.pay.connector.common.model.api.ExternalChargeState.EXTERNAL_SUBMITTED; import static uk.gov.pay.connector.common.model.api.ExternalChargeState.EXTERNAL_SUCCESS; -import static uk.gov.pay.connector.model.domain.ChargeEntityFixture.aValidChargeEntity; +import static uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture.aValidChargeEntity; public class ChargeEntityTest { diff --git a/src/test/java/uk/gov/pay/connector/model/domain/RefundEntityFixture.java b/src/test/java/uk/gov/pay/connector/model/domain/RefundEntityFixture.java index 5706d05eab..807b36fd54 100644 --- a/src/test/java/uk/gov/pay/connector/model/domain/RefundEntityFixture.java +++ b/src/test/java/uk/gov/pay/connector/model/domain/RefundEntityFixture.java @@ -1,6 +1,7 @@ package uk.gov.pay.connector.model.domain; import uk.gov.pay.connector.charge.model.domain.ChargeEntity; +import uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture; import uk.gov.pay.connector.gatewayaccount.model.GatewayAccountEntity; import uk.gov.pay.connector.refund.model.domain.RefundEntity; import uk.gov.pay.connector.refund.model.domain.RefundStatus; @@ -9,7 +10,7 @@ import java.time.ZonedDateTime; import static org.apache.commons.lang.math.RandomUtils.nextLong; -import static uk.gov.pay.connector.model.domain.ChargeEntityFixture.aValidChargeEntity; +import static uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture.aValidChargeEntity; public class RefundEntityFixture { diff --git a/src/test/java/uk/gov/pay/connector/model/domain/RefundEntityTest.java b/src/test/java/uk/gov/pay/connector/model/domain/RefundEntityTest.java index 53a940e8a0..37156e4946 100644 --- a/src/test/java/uk/gov/pay/connector/model/domain/RefundEntityTest.java +++ b/src/test/java/uk/gov/pay/connector/model/domain/RefundEntityTest.java @@ -10,7 +10,7 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; -import static uk.gov.pay.connector.model.domain.ChargeEntityFixture.aValidChargeEntity; +import static uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture.aValidChargeEntity; import static uk.gov.pay.connector.model.domain.RefundEntityFixture.aValidRefundEntity; import static uk.gov.pay.connector.model.domain.RefundEntityFixture.userEmail; import static uk.gov.pay.connector.model.domain.RefundEntityFixture.userExternalId; diff --git a/src/test/java/uk/gov/pay/connector/pact/ChargeEventEntityFixture.java b/src/test/java/uk/gov/pay/connector/pact/ChargeEventEntityFixture.java index 3c34e8504f..6644d0153f 100644 --- a/src/test/java/uk/gov/pay/connector/pact/ChargeEventEntityFixture.java +++ b/src/test/java/uk/gov/pay/connector/pact/ChargeEventEntityFixture.java @@ -8,7 +8,7 @@ import java.time.ZonedDateTime; import java.util.Optional; -import static uk.gov.pay.connector.model.domain.ChargeEntityFixture.aValidChargeEntity; +import static uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture.aValidChargeEntity; public class ChargeEventEntityFixture { private ChargeStatus chargeStatus = ChargeStatus.CAPTURED; diff --git a/src/test/java/uk/gov/pay/connector/pact/QueueMessageContractTest.java b/src/test/java/uk/gov/pay/connector/pact/QueueMessageContractTest.java index 08f8064ca8..05021d3c9a 100644 --- a/src/test/java/uk/gov/pay/connector/pact/QueueMessageContractTest.java +++ b/src/test/java/uk/gov/pay/connector/pact/QueueMessageContractTest.java @@ -29,7 +29,7 @@ import uk.gov.pay.connector.events.model.refund.RefundCreatedByUser; import uk.gov.pay.connector.events.model.refund.RefundSubmitted; import uk.gov.pay.connector.events.model.refund.RefundSucceeded; -import uk.gov.pay.connector.model.domain.ChargeEntityFixture; +import uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture; import uk.gov.pay.connector.refund.model.domain.RefundHistory; import uk.gov.pay.connector.refund.model.domain.RefundStatus; diff --git a/src/test/java/uk/gov/pay/connector/paymentprocessor/service/CardAuthoriseServiceTest.java b/src/test/java/uk/gov/pay/connector/paymentprocessor/service/CardAuthoriseServiceTest.java index a93cc5947e..bb957e63c0 100644 --- a/src/test/java/uk/gov/pay/connector/paymentprocessor/service/CardAuthoriseServiceTest.java +++ b/src/test/java/uk/gov/pay/connector/paymentprocessor/service/CardAuthoriseServiceTest.java @@ -39,7 +39,7 @@ import uk.gov.pay.connector.gatewayaccount.model.GatewayAccountEntity; import uk.gov.pay.connector.model.domain.AddressFixture; import uk.gov.pay.connector.model.domain.AuthCardDetailsFixture; -import uk.gov.pay.connector.model.domain.ChargeEntityFixture; +import uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture; import uk.gov.pay.connector.paymentprocessor.api.AuthorisationResponse; import uk.gov.pay.connector.queue.StateTransitionService; diff --git a/src/test/java/uk/gov/pay/connector/paymentprocessor/service/CardServiceTest.java b/src/test/java/uk/gov/pay/connector/paymentprocessor/service/CardServiceTest.java index 220f73c00d..b658785dcc 100644 --- a/src/test/java/uk/gov/pay/connector/paymentprocessor/service/CardServiceTest.java +++ b/src/test/java/uk/gov/pay/connector/paymentprocessor/service/CardServiceTest.java @@ -13,7 +13,7 @@ import uk.gov.pay.connector.gateway.PaymentProvider; import uk.gov.pay.connector.gateway.PaymentProviders; import uk.gov.pay.connector.gatewayaccount.model.GatewayAccountEntity; -import uk.gov.pay.connector.model.domain.ChargeEntityFixture; +import uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture; import java.time.ZonedDateTime; import java.util.List; diff --git a/src/test/java/uk/gov/pay/connector/paymentprocessor/service/DiscrepancyServiceTest.java b/src/test/java/uk/gov/pay/connector/paymentprocessor/service/DiscrepancyServiceTest.java index 3e1f669852..47195f1fc6 100644 --- a/src/test/java/uk/gov/pay/connector/paymentprocessor/service/DiscrepancyServiceTest.java +++ b/src/test/java/uk/gov/pay/connector/paymentprocessor/service/DiscrepancyServiceTest.java @@ -10,7 +10,7 @@ import uk.gov.pay.connector.charge.service.ChargeService; import uk.gov.pay.connector.gateway.ChargeQueryResponse; import uk.gov.pay.connector.gateway.GatewayException; -import uk.gov.pay.connector.model.domain.ChargeEntityFixture; +import uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture; import java.time.ZonedDateTime; import java.util.Collections; diff --git a/src/test/java/uk/gov/pay/connector/paymentprocessor/service/QueryServiceTest.java b/src/test/java/uk/gov/pay/connector/paymentprocessor/service/QueryServiceTest.java index d267685951..def4a0c83e 100644 --- a/src/test/java/uk/gov/pay/connector/paymentprocessor/service/QueryServiceTest.java +++ b/src/test/java/uk/gov/pay/connector/paymentprocessor/service/QueryServiceTest.java @@ -17,7 +17,7 @@ import static org.mockito.Mockito.when; import static uk.gov.pay.connector.charge.model.domain.ChargeStatus.AUTHORISATION_3DS_REQUIRED; import static uk.gov.pay.connector.charge.model.domain.ChargeStatus.CAPTURED; -import static uk.gov.pay.connector.model.domain.ChargeEntityFixture.aValidChargeEntity; +import static uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture.aValidChargeEntity; @RunWith(MockitoJUnitRunner.class) public class QueryServiceTest { diff --git a/src/test/java/uk/gov/pay/connector/service/ChargeRefundServiceTest.java b/src/test/java/uk/gov/pay/connector/service/ChargeRefundServiceTest.java index 272b7c7858..149f07fc69 100644 --- a/src/test/java/uk/gov/pay/connector/service/ChargeRefundServiceTest.java +++ b/src/test/java/uk/gov/pay/connector/service/ChargeRefundServiceTest.java @@ -55,7 +55,7 @@ import static uk.gov.pay.connector.gateway.PaymentGatewayName.SMARTPAY; import static uk.gov.pay.connector.gateway.PaymentGatewayName.WORLDPAY; import static uk.gov.pay.connector.gatewayaccount.model.GatewayAccountEntity.Type.TEST; -import static uk.gov.pay.connector.model.domain.ChargeEntityFixture.aValidChargeEntity; +import static uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture.aValidChargeEntity; import static uk.gov.pay.connector.model.domain.RefundEntityFixture.aValidRefundEntity; import static uk.gov.pay.connector.model.domain.RefundEntityFixture.userExternalId; import static uk.gov.pay.connector.refund.model.domain.RefundStatus.CREATED; diff --git a/src/test/java/uk/gov/pay/connector/service/DefaultExternalRefundAvailabilityCalculatorTest.java b/src/test/java/uk/gov/pay/connector/service/DefaultExternalRefundAvailabilityCalculatorTest.java index 8f1fc98af7..b0a1c11524 100644 --- a/src/test/java/uk/gov/pay/connector/service/DefaultExternalRefundAvailabilityCalculatorTest.java +++ b/src/test/java/uk/gov/pay/connector/service/DefaultExternalRefundAvailabilityCalculatorTest.java @@ -42,7 +42,7 @@ import static uk.gov.pay.connector.common.model.api.ExternalChargeRefundAvailability.EXTERNAL_FULL; import static uk.gov.pay.connector.common.model.api.ExternalChargeRefundAvailability.EXTERNAL_PENDING; import static uk.gov.pay.connector.common.model.api.ExternalChargeRefundAvailability.EXTERNAL_UNAVAILABLE; -import static uk.gov.pay.connector.model.domain.ChargeEntityFixture.aValidChargeEntity; +import static uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture.aValidChargeEntity; import static uk.gov.pay.connector.model.domain.RefundEntityFixture.aValidRefundEntity; public class DefaultExternalRefundAvailabilityCalculatorTest { diff --git a/src/test/java/uk/gov/pay/connector/service/EpdqExternalRefundAvailabilityCalculatorTest.java b/src/test/java/uk/gov/pay/connector/service/EpdqExternalRefundAvailabilityCalculatorTest.java index e46ea4271b..f3e2c26663 100644 --- a/src/test/java/uk/gov/pay/connector/service/EpdqExternalRefundAvailabilityCalculatorTest.java +++ b/src/test/java/uk/gov/pay/connector/service/EpdqExternalRefundAvailabilityCalculatorTest.java @@ -43,7 +43,7 @@ import static uk.gov.pay.connector.common.model.api.ExternalChargeRefundAvailability.EXTERNAL_FULL; import static uk.gov.pay.connector.common.model.api.ExternalChargeRefundAvailability.EXTERNAL_PENDING; import static uk.gov.pay.connector.common.model.api.ExternalChargeRefundAvailability.EXTERNAL_UNAVAILABLE; -import static uk.gov.pay.connector.model.domain.ChargeEntityFixture.aValidChargeEntity; +import static uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture.aValidChargeEntity; import static uk.gov.pay.connector.model.domain.RefundEntityFixture.aValidRefundEntity; public class EpdqExternalRefundAvailabilityCalculatorTest { diff --git a/src/test/java/uk/gov/pay/connector/tasks/HistoricalEventEmitterWorkerTest.java b/src/test/java/uk/gov/pay/connector/tasks/HistoricalEventEmitterWorkerTest.java index 0e8e35228a..7153268372 100644 --- a/src/test/java/uk/gov/pay/connector/tasks/HistoricalEventEmitterWorkerTest.java +++ b/src/test/java/uk/gov/pay/connector/tasks/HistoricalEventEmitterWorkerTest.java @@ -25,7 +25,7 @@ import uk.gov.pay.connector.events.model.charge.PaymentStarted; import uk.gov.pay.connector.events.model.refund.RefundCreatedByService; import uk.gov.pay.connector.events.model.refund.RefundSucceeded; -import uk.gov.pay.connector.model.domain.ChargeEntityFixture; +import uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture; import uk.gov.pay.connector.pact.ChargeEventEntityFixture; import uk.gov.pay.connector.pact.RefundHistoryEntityFixture; import uk.gov.pay.connector.queue.StateTransition; diff --git a/src/test/java/uk/gov/pay/connector/tasks/ParityCheckWorkerTest.java b/src/test/java/uk/gov/pay/connector/tasks/ParityCheckWorkerTest.java index d5a28163fc..d099cbfe9d 100644 --- a/src/test/java/uk/gov/pay/connector/tasks/ParityCheckWorkerTest.java +++ b/src/test/java/uk/gov/pay/connector/tasks/ParityCheckWorkerTest.java @@ -14,7 +14,7 @@ import uk.gov.pay.connector.chargeevent.model.domain.ChargeEventEntity; import uk.gov.pay.connector.events.EventService; import uk.gov.pay.connector.events.dao.EmittedEventDao; -import uk.gov.pay.connector.model.domain.ChargeEntityFixture; +import uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture; import uk.gov.pay.connector.pact.ChargeEventEntityFixture; import uk.gov.pay.connector.paritycheck.LedgerService; import uk.gov.pay.connector.queue.StateTransitionService; diff --git a/src/test/java/uk/gov/pay/connector/usernotification/service/UserNotificationServiceEmailCollectionModeTest.java b/src/test/java/uk/gov/pay/connector/usernotification/service/UserNotificationServiceEmailCollectionModeTest.java index 7123336e10..9b8be97bad 100644 --- a/src/test/java/uk/gov/pay/connector/usernotification/service/UserNotificationServiceEmailCollectionModeTest.java +++ b/src/test/java/uk/gov/pay/connector/usernotification/service/UserNotificationServiceEmailCollectionModeTest.java @@ -31,8 +31,8 @@ import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -import static uk.gov.pay.connector.model.domain.ChargeEntityFixture.aValidChargeEntity; -import static uk.gov.pay.connector.model.domain.ChargeEntityFixture.defaultGatewayAccountEntity; +import static uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture.aValidChargeEntity; +import static uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture.defaultGatewayAccountEntity; @RunWith(JUnitParamsRunner.class) public class UserNotificationServiceEmailCollectionModeTest { diff --git a/src/test/java/uk/gov/pay/connector/usernotification/service/UserNotificationServiceTest.java b/src/test/java/uk/gov/pay/connector/usernotification/service/UserNotificationServiceTest.java index 7203a074eb..91af8bbd71 100644 --- a/src/test/java/uk/gov/pay/connector/usernotification/service/UserNotificationServiceTest.java +++ b/src/test/java/uk/gov/pay/connector/usernotification/service/UserNotificationServiceTest.java @@ -16,7 +16,7 @@ import uk.gov.pay.connector.charge.model.ServicePaymentReference; import uk.gov.pay.connector.charge.model.domain.ChargeEntity; import uk.gov.pay.connector.gatewayaccount.model.GatewayAccountEntity; -import uk.gov.pay.connector.model.domain.ChargeEntityFixture; +import uk.gov.pay.connector.charge.model.domain.ChargeEntityFixture; import uk.gov.pay.connector.model.domain.RefundEntityFixture; import uk.gov.pay.connector.refund.model.domain.RefundEntity; import uk.gov.pay.connector.usernotification.govuknotify.NotifyClientFactory;