From d1fb8935e794e1c171754defb478762954f8d5cd Mon Sep 17 00:00:00 2001 From: amit2103 Date: Sun, 30 Dec 2018 00:00:21 +0530 Subject: [PATCH] [BAEL-10836] - Removed CollectionsEmpty from core-java-collections module --- .../java/collections/CollectionsEmpty.java | 26 ------------------- 1 file changed, 26 deletions(-) delete mode 100644 core-java-collections/src/test/java/org/baeldung/java/collections/CollectionsEmpty.java diff --git a/core-java-collections/src/test/java/org/baeldung/java/collections/CollectionsEmpty.java b/core-java-collections/src/test/java/org/baeldung/java/collections/CollectionsEmpty.java deleted file mode 100644 index 09ecebe47b..0000000000 --- a/core-java-collections/src/test/java/org/baeldung/java/collections/CollectionsEmpty.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.baeldung.java.collections; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import org.junit.Assert; -import org.junit.Test; - -class CollectionsEmpty { - - @Test - public void givenArrayList_whenAddingElement_addsNewElement() { - ArrayList mutableList = new ArrayList<>(); - mutableList.add("test"); - - Assert.assertEquals(mutableList.size(), 1); - Assert.assertEquals(mutableList.get(0), "test"); - } - - @Test(expected = UnsupportedOperationException.class) - public void givenCollectionsEmptyList_whenAddingElement_throwsUnsupportedOperationException() { - List immutableList = Collections.emptyList(); - immutableList.add("test"); - } - -}