Replace assertThat(x.iterator().next()) with assertThat(x).element(0)

Search for   : assertThat\((.+).iterator\(\).next\(\)\)
Replace with : assertThat($1).element(0)
This commit is contained in:
Yanming Zhou
2023-12-06 10:36:28 +08:00
parent 3f9a809c32
commit 785ad399e9
28 changed files with 67 additions and 67 deletions

View File

@@ -47,7 +47,7 @@ public abstract class AbstractCacheOperationTests<O extends JCacheOperation<?>>
assertThat(operation.getCacheName()).as("Wrong cache name").isEqualTo("simpleCache");
assertThat(operation.getAnnotations()).as("Unexpected number of annotation on " + operation.getMethod())
.hasSize(1);
assertThat(operation.getAnnotations().iterator().next()).as("Wrong method annotation").isEqualTo(operation.getCacheAnnotation());
assertThat(operation.getAnnotations()).element(0).as("Wrong method annotation").isEqualTo(operation.getCacheAnnotation());
assertThat(operation.getCacheResolver()).as("cache resolver should be set").isNotNull();
}