@@ -67,15 +67,17 @@ public void shouldNotConvertToAuthorizingPaymentDetail() {
6767 @ Test
6868 @ DisplayName ("It should yield true if instance is of type AuthorizedPaymentDetail" )
6969 public void shouldYieldTrueIfAuthorizedPaymentDetail () {
70- PaymentDetail sut = new AuthorizedPaymentDetail (null , new AuthorizationFlowWithConfiguration (null ));
70+ PaymentDetail sut = new AuthorizedPaymentDetail (
71+ null , new AuthorizationFlowWithConfiguration (null ), ZonedDateTime .now (Clock .systemUTC ()));
7172
7273 assertTrue (sut .isAuthorized ());
7374 }
7475
7576 @ Test
7677 @ DisplayName ("It should convert to an instance of class AuthorizedPaymentDetail" )
7778 public void shouldConvertToAuthorizedPaymentDetail () {
78- PaymentDetail sut = new AuthorizedPaymentDetail (null , new AuthorizationFlowWithConfiguration (null ));
79+ PaymentDetail sut = new AuthorizedPaymentDetail (
80+ null , new AuthorizationFlowWithConfiguration (null ), ZonedDateTime .now (Clock .systemUTC ()));
7981
8082 assertDoesNotThrow (sut ::asAuthorized );
8183 }
@@ -96,6 +98,7 @@ public void shouldYieldTrueIfFailedPaymentDetail() {
9698 PaymentDetail sut = new FailedPaymentDetail (
9799 null ,
98100 ZonedDateTime .now (Clock .systemUTC ()),
101+ ZonedDateTime .now (Clock .systemUTC ()),
99102 FailedPaymentDetail .FailureStage .AUTHORIZATION_REQUIRED ,
100103 "failed for some reason" ,
101104 null );
@@ -109,6 +112,7 @@ public void shouldConvertToFailedPaymentDetail() {
109112 PaymentDetail sut = new FailedPaymentDetail (
110113 null ,
111114 ZonedDateTime .now (Clock .systemUTC ()),
115+ ZonedDateTime .now (Clock .systemUTC ()),
112116 FailedPaymentDetail .FailureStage .AUTHORIZATION_REQUIRED ,
113117 "failed for some reason" ,
114118 null );
@@ -134,6 +138,7 @@ public void shouldYieldTrueIfSettledPaymentDetail() {
134138 ZonedDateTime .now (Clock .systemUTC ()),
135139 ZonedDateTime .now (Clock .systemUTC ()),
136140 ZonedDateTime .now (Clock .systemUTC ()),
141+ ZonedDateTime .now (Clock .systemUTC ()),
137142 null ,
138143 null );
139144
@@ -148,6 +153,7 @@ public void shouldConvertToSettledPaymentDetail() {
148153 ZonedDateTime .now (Clock .systemUTC ()),
149154 ZonedDateTime .now (Clock .systemUTC ()),
150155 ZonedDateTime .now (Clock .systemUTC ()),
156+ ZonedDateTime .now (Clock .systemUTC ()),
151157 null ,
152158 null );
153159
@@ -167,15 +173,17 @@ public void shouldNotConvertToSettledPaymentDetail() {
167173 @ Test
168174 @ DisplayName ("It should yield true if instance is of type ExecutedPaymentDetail" )
169175 public void shouldYieldTrueIfExecutedPaymentDetail () {
170- PaymentDetail sut = new ExecutedPaymentDetail (null , ZonedDateTime .now (Clock .systemUTC ()), null , null );
176+ PaymentDetail sut = new ExecutedPaymentDetail (
177+ null , ZonedDateTime .now (Clock .systemUTC ()), ZonedDateTime .now (Clock .systemUTC ()), null , null );
171178
172179 assertTrue (sut .isExecuted ());
173180 }
174181
175182 @ Test
176183 @ DisplayName ("It should convert to an instance of class ExecutedPaymentDetail" )
177184 public void shouldConvertToExecutedPaymentDetail () {
178- PaymentDetail sut = new ExecutedPaymentDetail (null , ZonedDateTime .now (Clock .systemUTC ()), null , null );
185+ PaymentDetail sut = new ExecutedPaymentDetail (
186+ null , ZonedDateTime .now (Clock .systemUTC ()), ZonedDateTime .now (Clock .systemUTC ()), null , null );
179187
180188 assertDoesNotThrow (sut ::asExecuted );
181189 }
0 commit comments