Refactor LambdaExceptionWrappersTest

This commit is contained in:
pivovarit 2017-01-17 09:04:42 +01:00
parent 0aa46996a6
commit 7f8ee6f118
1 changed files with 4 additions and 4 deletions

View File

@ -1,12 +1,12 @@
package com.baeldung.java8.lambda.exceptions;
import org.junit.Before;
import org.junit.Test;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
import org.junit.Before;
import org.junit.Test;
import static com.baeldung.java8.lambda.exceptions.LambdaExceptionWrappers.*;
public class LambdaExceptionWrappersTest {
@ -38,7 +38,7 @@ public class LambdaExceptionWrappersTest {
integers.forEach(handlingConsumerWrapper(i -> writeToFile(i), IOException.class));
}
void writeToFile(Integer i) throws IOException {
private void writeToFile(Integer i) throws IOException {
if (i == 0) {
throw new IOException(); // mock IOException
}