@@ -163,9 +163,9 @@ void simpleMapPropertySourceKeyDataChangeInvalidatesCache() {
163
163
EnumerablePropertySource <?> source = new MapPropertySource ("test" , map );
164
164
SpringIterableConfigurationPropertySource adapter = new SpringIterableConfigurationPropertySource (source ,
165
165
DefaultPropertyMapper .INSTANCE );
166
- assertThat (adapter .stream (). count ()). isEqualTo (2 );
166
+ assertThat (adapter .stream ()). hasSize (2 );
167
167
map .put ("key3" , "value3" );
168
- assertThat (adapter .stream (). count ()). isEqualTo (3 );
168
+ assertThat (adapter .stream ()). hasSize (3 );
169
169
}
170
170
171
171
@ Test
@@ -177,10 +177,10 @@ void concurrentModificationExceptionInvalidatesCache() {
177
177
EnumerablePropertySource <?> source = new MapPropertySource ("test" , map );
178
178
SpringIterableConfigurationPropertySource adapter = new SpringIterableConfigurationPropertySource (source ,
179
179
DefaultPropertyMapper .INSTANCE );
180
- assertThat (adapter .stream (). count ()). isEqualTo (2 );
180
+ assertThat (adapter .stream ()). hasSize (2 );
181
181
map .setThrowException (true );
182
182
map .put ("key3" , "value3" );
183
- assertThat (adapter .stream (). count ()). isEqualTo (3 );
183
+ assertThat (adapter .stream ()). hasSize (3 );
184
184
}
185
185
186
186
@ Test
@@ -192,9 +192,9 @@ public void originTrackedMapPropertySourceKeyAdditionInvalidatesCache() {
192
192
EnumerablePropertySource <?> source = new OriginTrackedMapPropertySource ("test" , map );
193
193
SpringIterableConfigurationPropertySource adapter = new SpringIterableConfigurationPropertySource (source ,
194
194
DefaultPropertyMapper .INSTANCE );
195
- assertThat (adapter .stream (). count ()). isEqualTo (2 );
195
+ assertThat (adapter .stream ()). hasSize (2 );
196
196
map .put ("key3" , "value3" );
197
- assertThat (adapter .stream (). count ()). isEqualTo (3 );
197
+ assertThat (adapter .stream ()). hasSize (3 );
198
198
}
199
199
200
200
@ Test
@@ -206,9 +206,9 @@ public void readOnlyOriginTrackedMapPropertySourceKeyAdditionDoesNotInvalidateCa
206
206
EnumerablePropertySource <?> source = new OriginTrackedMapPropertySource ("test" , map , true );
207
207
SpringIterableConfigurationPropertySource adapter = new SpringIterableConfigurationPropertySource (source ,
208
208
DefaultPropertyMapper .INSTANCE );
209
- assertThat (adapter .stream (). count ()). isEqualTo (2 );
209
+ assertThat (adapter .stream ()). hasSize (2 );
210
210
map .put ("key3" , "value3" );
211
- assertThat (adapter .stream (). count ()). isEqualTo (2 );
211
+ assertThat (adapter .stream ()). hasSize (2 );
212
212
}
213
213
214
214
/**
0 commit comments