Skip to content

Commit 956b118

Browse files
committed
Use collection factory calls
1 parent aba344a commit 956b118

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/test/java/com/jnape/palatable/lambda/optics/lenses/MapLensTest.java

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -176,17 +176,9 @@ public void mappingValuesWithIsoRetainsMapStructureWithMappedValues() {
176176
assertLensLawfulness(mappingValues(iso(Integer::parseInt, Object::toString)),
177177
asList(emptyMap(),
178178
singletonMap("foo", "1"),
179-
unmodifiableMap(new HashMap<String, String>() {{
180-
put("foo", "1");
181-
put("bar", "2");
182-
put("baz", "3");
183-
}})),
179+
Map.of("foo", "1", "bar", "2", "baz", "3")),
184180
asList(emptyMap(),
185181
singletonMap("foo", 1),
186-
unmodifiableMap(new HashMap<String, Integer>() {{
187-
put("foo", 1);
188-
put("bar", 2);
189-
put("baz", 3);
190-
}})));
182+
Map.of("foo", 1, "bar", 2, "baz", 3)));
191183
}
192184
}

0 commit comments

Comments
 (0)