6
6
import java .util .Set ;
7
7
import java .util .TreeSet ;
8
8
import java .util .concurrent .atomic .AtomicInteger ;
9
- import java .util .stream .Collectors ;
10
9
import java .util .stream .IntStream ;
11
10
import java .util .stream .LongStream ;
12
11
@@ -91,12 +90,12 @@ void toDto_test_Ok() {
91
90
92
91
List <String > sts = IntStream .range (0 , 8 )
93
92
.mapToObj (p -> SUCCESS_OPERATION_STATUS .getStatus ())
94
- .collect ( Collectors . toList () );
93
+ .toList ();
95
94
assertThat ((into .getBlock ().getTransactions ()))
96
95
.extracting (t -> t .getOperations ()
97
96
.stream ()
98
97
.map (Operation ::getStatus )
99
- .collect ( Collectors . toList () ))
98
+ .toList ())
100
99
.containsAnyOf (sts );
101
100
102
101
List <OperationIdentifier > opIds = LongStream .range (0 , 8 )
@@ -109,14 +108,14 @@ void toDto_test_Ok() {
109
108
.extracting (t -> t .getOperations ()
110
109
.stream ()
111
110
.map (Operation ::getOperationIdentifier )
112
- .collect ( Collectors . toList () ))
111
+ .toList ())
113
112
.containsAnyOf (opIds );
114
113
115
114
assertThat ((into .getBlock ().getTransactions ()))
116
115
.extracting (t -> t .getOperations ()
117
116
.stream ()
118
117
.map (Operation ::getRelatedOperations )
119
- .collect ( Collectors . toList () ))
118
+ .toList ())
120
119
.extracting (p -> p == null ? Collections .emptyList () : p )
121
120
.allSatisfy (
122
121
BlockToBlockResponseTest ::assertAllElementsIsNull );
@@ -130,7 +129,7 @@ void toDto_test_Ok() {
130
129
.extracting (t -> t .getOperations ()
131
130
.stream ()
132
131
.map (Operation ::getType )
133
- .collect ( Collectors . toList () ))
132
+ .toList ())
134
133
.containsAnyOf (types );
135
134
136
135
List <AccountIdentifier > accIds = List .of (
@@ -142,14 +141,14 @@ void toDto_test_Ok() {
142
141
.extracting (t -> t .getOperations ()
143
142
.stream ()
144
143
.map (Operation ::getAccount )
145
- .collect ( Collectors . toList () ))
144
+ .toList ())
146
145
.containsAnyOf (accIds );
147
146
148
147
assertThat ((into .getBlock ().getTransactions ()))
149
148
.extracting (t -> t .getOperations ()
150
149
.stream ()
151
150
.map (Operation ::getCoinChange )
152
- .collect ( Collectors . toList () ))
151
+ .toList ())
153
152
.allSatisfy (BlockToBlockResponseTest ::assertAllElementsIsNull );
154
153
155
154
Currency ada = Currency
@@ -165,7 +164,7 @@ void toDto_test_Ok() {
165
164
.filter (
166
165
g -> g .getType ().equals ("stakeKeyRegistration" ))
167
166
.map (Operation ::getMetadata )
168
- .collect ( Collectors . toList () ))
167
+ .toList ())
169
168
.allSatisfy (d -> {
170
169
assertAllPropertiesIsNull (d , "depositAmount" );
171
170
assertProperty (d , "depositAmount" ,
@@ -184,7 +183,7 @@ void toDto_test_Ok() {
184
183
.filter (
185
184
g -> g .getType ().equals ("poolRegistration" ))
186
185
.map (Operation ::getMetadata )
187
- .collect ( Collectors . toList () ))
186
+ .toList ())
188
187
.allSatisfy (d -> {
189
188
190
189
assertAllPropertiesIsNull (d , "depositAmount" , "poolRegistrationParams" );
@@ -206,7 +205,7 @@ void toDto_test_Ok() {
206
205
.filter (
207
206
g -> g .getType ().equals ("poolRetirement" ))
208
207
.map (Operation ::getMetadata )
209
- .collect ( Collectors . toList () ))
208
+ .toList ())
210
209
.allSatisfy (d -> {
211
210
assertAllPropertiesIsNull (d , "epoch" );
212
211
assertProperty (List .of (d .getFirst ()), "epoch" , aiEpoch .incrementAndGet ());
@@ -220,7 +219,7 @@ void toDto_test_Ok() {
220
219
.filter (
221
220
g -> g .getType ().equals ("stakeDelegation" ))
222
221
.map (Operation ::getMetadata )
223
- .collect ( Collectors . toList () ))
222
+ .toList ())
224
223
.allSatisfy (d ->
225
224
{
226
225
assertAllPropertiesIsNull (d , "poolKeyHash" );
@@ -313,7 +312,7 @@ private List<Delegation> newDelegations(int... instances) {
313
312
.poolId ("poolDlg" + ver )
314
313
.address ("delegationAcc" + ver )
315
314
.build ())
316
- .collect ( Collectors . toList () );
315
+ .toList ();
317
316
}
318
317
319
318
private List <PoolRegistration > newPoolRegistrations (int ... instances ) {
@@ -330,7 +329,7 @@ private List<PoolRegistration> newPoolRegistrations(int... instances) {
330
329
.relays (List .of (Relay .builder ().ipv4 ("ipv4" + ver ).ipv6 ("ipv6" + ver )
331
330
.dnsName ("dnsName" + ver ).port (1 + ver ).type ("type" + ver ).build ()))
332
331
.build ())
333
- .collect ( Collectors . toList () );
332
+ .toList ();
334
333
}
335
334
336
335
@ NotNull
@@ -349,7 +348,7 @@ private List<PoolRetirement> newPoolRetirements(int... instances) {
349
348
.poolId ("poolRet" + ver )
350
349
.epoch (1 + ver )
351
350
.build ())
352
- .collect ( Collectors . toList () );
351
+ .toList ();
353
352
}
354
353
355
354
private List <StakeRegistration > newStakeRegistrations (int ... instances ) {
@@ -361,7 +360,7 @@ private List<StakeRegistration> newStakeRegistrations(int... instances) {
361
360
.type (CertificateType .STAKE_REGISTRATION )
362
361
.address ("address" + ver )
363
362
.build ())
364
- .collect ( Collectors . toList () );
363
+ .toList ();
365
364
366
365
367
366
}
0 commit comments