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

@@ -225,7 +225,7 @@ class RequestMappingHandlerMappingTests {
Set<RequestMethod> methods = info.getMethodsCondition().getMethods();
assertThat(methods).hasSize(1);
assertThat(methods.iterator().next()).isEqualTo(requestMethod);
assertThat(methods).element(0).isEqualTo(requestMethod);
return info;
}