Statement lambda can be replaced with expression lambda

This commit is contained in:
Alex Golub
2022-04-20 14:03:48 +03:00
parent a538beb16c
commit 488631d4ba

View File

@@ -24,9 +24,7 @@ class ExceptionUnitTest {
@Test
void assertThrowsException() {
String str = null;
assertThrows(IllegalArgumentException.class, () -> {
Integer.valueOf(str);
});
assertThrows(IllegalArgumentException.class, () -> Integer.valueOf(str));
}
@Test