BAEL-677 Small refactoring

This commit is contained in:
Pedja 2017-02-07 11:54:48 +01:00
parent 4ba5e3fab3
commit 3559789573
1 changed files with 4 additions and 5 deletions

View File

@ -1,6 +1,5 @@
package com.baeldung.java.concurrentmodificationexception;
package com.baeldung.java.concurrentmodification;
import org.assertj.core.api.Assertions;
import org.junit.Test;
import java.util.ArrayList;
@ -22,7 +21,7 @@ public class ConcurrentModificationUnitTest {
}
@Test
public void givenIterating_whenUsingIteratorRemove_thenDontError() throws InterruptedException {
public void givenIterating_whenUsingIteratorRemove_thenNoError() throws InterruptedException {
ArrayList<Integer> integers = newArrayList(1, 2, 3);
@ -37,7 +36,7 @@ public class ConcurrentModificationUnitTest {
}
@Test
public void givenIterating_whenUsingRemovalList_thenDontError() throws InterruptedException {
public void givenIterating_whenUsingRemovalList_thenNoError() throws InterruptedException {
ArrayList<Integer> integers = newArrayList(1, 2, 3);
ArrayList<Integer> toRemove = newArrayList();
@ -57,7 +56,7 @@ public class ConcurrentModificationUnitTest {
ArrayList<Integer> integers = newArrayList(1, 2, 3);
integers.removeIf((i) -> i == 2);
integers.removeIf(i -> i == 2);
assertThat(integers).containsExactly(1, 3);
}