diff --git a/.idea/.name b/.idea/.name
new file mode 100644
index 0000000..1f58a0f
--- /dev/null
+++ b/.idea/.name
@@ -0,0 +1 @@
+generics
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
new file mode 100644
index 0000000..c20d346
--- /dev/null
+++ b/.idea/compiler.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__junit_junit_4_12.xml b/.idea/libraries/Maven__junit_junit_4_12.xml
new file mode 100644
index 0000000..d411041
--- /dev/null
+++ b/.idea/libraries/Maven__junit_junit_4_12.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml b/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml
new file mode 100644
index 0000000..f58bbc1
--- /dev/null
+++ b/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..d30d09e
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..ca63f44
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
new file mode 100644
index 0000000..ec148f1
--- /dev/null
+++ b/.idea/workspace.xml
@@ -0,0 +1,700 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ iterator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ DEFINITION_ORDER
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1520538929269
+
+
+ 1520538929269
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/generics.iml b/generics.iml
new file mode 100644
index 0000000..9717c26
--- /dev/null
+++ b/generics.iml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/java/.deleteme b/src/main/java/.deleteme
deleted file mode 100644
index e69de29..0000000
diff --git a/src/main/java/Entry.java b/src/main/java/Entry.java
new file mode 100644
index 0000000..bcc3eaa
--- /dev/null
+++ b/src/main/java/Entry.java
@@ -0,0 +1,23 @@
+public class Entry {
+
+ K key;
+ V value;
+
+ public Entry(K key, V value) {
+ this.key = key;
+ this.value = value;
+ }
+
+ public V getValue() {
+ return this.value;
+ }
+
+ public K getKey() {
+ return this.key;
+ }
+
+ public void setValue(V anotherValue) {
+ this.value = anotherValue;
+ }
+
+}
diff --git a/src/main/java/MyArrayList.java b/src/main/java/MyArrayList.java
new file mode 100644
index 0000000..9802be3
--- /dev/null
+++ b/src/main/java/MyArrayList.java
@@ -0,0 +1,125 @@
+import java.util.ArrayList;
+import java.util.Arrays;
+
+public class MyArrayList {
+
+ private T[] array;
+ private int capacity;
+ private int currentIndex = 0;
+
+ public MyArrayList() {
+ this.array = (T[]) new Object[10];
+ this.capacity = 10;
+ }
+
+ public MyArrayList(int size) {
+ this.array = (T[]) new Object[size];
+ this.capacity = size;
+ }
+
+ public T[] getArray() {
+ return this.array;
+ }
+
+ public void add(T aThing) {
+
+ if (currentIndex < capacity) {
+ this.array[currentIndex] = aThing;
+ currentIndex++;
+ } else {
+ this.array = Arrays.copyOf(this.array, this.array.length * 2);
+ this.array[currentIndex] = aThing;
+ currentIndex++;
+ }
+ }
+
+ public void add(T aThing, int index) {
+ System.arraycopy(this.array, index, this.array, index + 1, ((this.array.length - index) - 1));
+ this.array[index] = aThing;
+ currentIndex++;
+ }
+
+ public T get(int index) {
+ return this.array[index];
+ }
+
+ public void remove(int index) {
+ System.arraycopy(this.array, index + 1, this.array, index, (this.array.length - 1) - index);
+ this.array[this.array.length - 1] = null;
+ this.currentIndex--;
+ }
+
+ public void remove(T aThing) {
+ System.arraycopy(this.array,indexOf(aThing) + 1, this.array, indexOf(aThing),(this.array.length - 1) - indexOf(aThing));
+ this.array[this.array.length - 1] = null;
+ this.currentIndex--;
+ }
+
+ public void set(int index, T aThing) {
+ this.array[index] = aThing;
+ }
+
+ public void clear() {
+
+ for (int i = 0; i < size() + 1; i++) {
+ this.array[i] = null;
+ }
+
+ this.currentIndex = 0;
+ }
+
+ public boolean isEmpty() {
+ if (size() == 0) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ public boolean contains(T aThing) {
+
+ for (int i = 0; i < size(); i++) {
+ if (this.array[i].equals(aThing)) {
+ return true;
+ }
+ }
+ return false;
+
+ }
+
+ public int size() {
+ return this.currentIndex;
+ }
+
+
+ public int indexOf(T aThing) {
+
+ int indexOf = 0;
+
+ for (int i = 0; i < this.array.length; i++) {
+ if (array[i] == (aThing)) {
+ indexOf = i;
+ }
+ }
+ return indexOf;
+ }
+
+ public int getCapacity() {
+ return this.capacity;
+ }
+
+ public int getCurrentIndex() {
+ return this.currentIndex;
+ }
+
+ public T[] getArrayList() {
+ T[] arrayList = (T[]) new Object[currentIndex + 1];
+
+ for (int i = 0; i < currentIndex + 1; i++) {
+ arrayList[i] = this.array[i];
+ }
+ return arrayList;
+ }
+
+
+}
diff --git a/src/main/java/MyMap.java b/src/main/java/MyMap.java
new file mode 100644
index 0000000..d745385
--- /dev/null
+++ b/src/main/java/MyMap.java
@@ -0,0 +1,62 @@
+
+public class MyMap {
+
+ private MyArrayList map;
+
+ public MyMap() {
+ map = new MyArrayList<>();
+ }
+
+ public boolean containsKey(K key) {
+ for (int i = 0; i < this.map.size(); i++) {
+ if (map.get(i).getKey().equals(key)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public boolean containsValue(V value) {
+ for (int i = 0; i < this.map.size(); i++) {
+ if (map.get(i).getValue().equals(value)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public void put(K key, V value) {
+ for (int i = 0; i < map.size(); i++) {
+ if (containsKey(key)) {
+ map.set(i, new Entry<>(key, value));
+ return;
+ }
+ }
+ map.add(new Entry<>(key, value));
+ }
+
+ public V get(K key) {
+ for (int i = 0; i < map.size(); i++) {
+ if (map.get(i).getKey().equals(key)) {
+ return (V)map.get(i).getValue();
+ }
+ }
+ return null;
+ }
+
+ public void remove(K key) {
+ for (int i = 0; i < map.size(); i++) {
+ if (map.get(i).getKey().equals(key)) {
+ map.remove(i);
+ }
+ }
+
+ }
+
+ public Integer size() {
+ return map.size();
+ }
+
+
+
+}
diff --git a/src/main/java/MySet.java b/src/main/java/MySet.java
new file mode 100644
index 0000000..a4cbe7f
--- /dev/null
+++ b/src/main/java/MySet.java
@@ -0,0 +1,107 @@
+import java.util.Iterator;
+import java.util.Set;
+
+public class MySet {
+
+ private MyArrayList set;
+
+ public MySet() {
+ this.set = new MyArrayList<>(1);
+
+ }
+
+ public void add(T aThing) {
+ if (!contains(aThing)) {
+ this.set.add(aThing);
+ }
+ }
+
+ public void addAll(T... things) {
+ for (int i = 0; i < things.length; i++) {
+ add(things[i]);
+ }
+ }
+
+ public void clear() {
+ this.set.clear();
+ }
+
+ public boolean contains(T aThing) {
+
+ for (int i = 0; i < set.size(); i++) {
+ if (this.set.get(i).equals(aThing)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public boolean containsAll(T... things) {
+ for (int i = 0; i < things.length; i++) {
+ if (!contains(things[i])) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ public boolean isEmpty() {
+ if (this.set.size() > 0) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+
+ public void remove(T aThing) {
+ this.set.remove(aThing);
+ }
+
+ public void removeAll(T... things) {
+ for (int i = 0; i < things.length; i++) {
+ remove(things[i]);
+ }
+ }
+
+ public int size() {
+ return getSet().size();
+ }
+
+ public Object[] toArray() {
+
+ Object[] objArray = new Object[size()];
+
+ for (int i = 0; i < size(); i++) {
+ objArray[i] = this.set.get(i);
+ }
+
+ return objArray;
+ }
+
+ public MyArrayList getSet() {
+ return this.set;
+ }
+
+// public Iterator iterator() {
+// return new Iterator() {
+// @Override
+// public void remove() {
+//
+// }
+//
+// @Override
+// public boolean hasNext() {
+// return false;
+// }
+//
+// @Override
+// public T next() {
+//
+//
+// return null;
+// }
+// };
+// }
+
+
+}
diff --git a/src/test/java/.deleteme b/src/test/java/.deleteme
deleted file mode 100644
index e69de29..0000000
diff --git a/src/test/java/MyArrayListTest.java b/src/test/java/MyArrayListTest.java
new file mode 100644
index 0000000..258cdc7
--- /dev/null
+++ b/src/test/java/MyArrayListTest.java
@@ -0,0 +1,210 @@
+import org.junit.Assert;
+import org.junit.Test;
+
+public class MyArrayListTest {
+
+ @Test
+ public void sizeTest() {
+ MyArrayList tester = new MyArrayList(5);
+ int expected = 0;
+ int actual = tester.size();
+ Assert.assertEquals(expected, actual);
+ }
+
+ @Test
+ public void addTest1() {
+ MyArrayList tester = new MyArrayList();
+ tester.add(7);
+ int expected = 1;
+ int actual = tester.size();
+ Assert.assertEquals(expected, actual);
+ }
+
+ @Test
+ public void addTest2() {
+ MyArrayList tester = new MyArrayList(2);
+ tester.add("Test");
+ tester.add("hello");
+ tester.add("world");
+ int expected = 4;
+ int actual = tester.getArray().length;
+ Assert.assertEquals(expected, actual);
+ }
+
+ @Test
+ public void addTest3() {
+ MyArrayList tester = new MyArrayList();
+ Integer expected = 14;
+ tester.add(11);
+ tester.add(expected);
+ tester.add(22);
+ Integer actual = (Integer) tester.get(1);
+ Assert.assertEquals(expected, actual);
+ }
+
+ @Test
+ public void addTest4() {
+ MyArrayList tester = new MyArrayList(3);
+ Object expected = "Go";
+ tester.add("Grease");
+ tester.add("Lightning");
+ tester.add(expected, 0);
+ Object actual = tester.get(0);
+ Assert.assertEquals(expected, actual);
+ }
+
+ @Test
+ public void addTest5() {
+ MyArrayList tester = new MyArrayList(2);
+ Integer expected = 99;
+ tester.add(14);
+ tester.add(7);
+ tester.add(expected);
+ tester.add(11);
+ tester.add(197, 2);
+ Integer actual = (Integer) tester.get(3);
+ Assert.assertEquals(expected, actual);
+ }
+
+ @Test
+ public void getTest1() {
+ MyArrayList tester = new MyArrayList(3);
+ tester.add("Hello");
+ Object expected = "Hello";
+ Object actual = tester.get(0);
+ Assert.assertEquals(expected, actual);
+ }
+
+ @Test
+ public void getTest2() {
+ MyArrayList tester = new MyArrayList();
+ double input = 8.885;
+ tester.add(3.14);
+ tester.add(input);
+ Object expected = input;
+ Object actual = tester.get(1);
+ Assert.assertEquals(expected, actual);
+ }
+
+ @Test
+ public void removeTest1() {
+ MyArrayList tester = new MyArrayList();
+ Object toRemove = "Kadabra";
+ Object expected = "Alakazam";
+ tester.add("Abra");
+ tester.add(toRemove);
+ tester.add(expected);
+ tester.remove(toRemove);
+ Object actual = tester.get(1);
+ Assert.assertEquals(expected, actual);
+ }
+
+ @Test
+ public void removeTest2() {
+ MyArrayList tester = new MyArrayList();
+ tester.add(3);
+ tester.add(6);
+ tester.add(9);
+ tester.remove(1);
+ int expected = 2;
+ int actual = tester.size();
+ Assert.assertEquals(expected, actual);
+ }
+
+ @Test
+ public void setTest1() {
+ MyArrayList tester = new MyArrayList();
+ Object expected = "Will";
+ tester.add("Marky");
+ tester.add("Ricky");
+ tester.add("Danny");
+ tester.set(1, expected);
+ Object actual = tester.getArray()[1];
+ Assert.assertEquals(expected, actual);
+ }
+
+ @Test
+ public void setTest2() {
+ MyArrayList tester = new MyArrayList();
+ Integer expected = 14;
+ tester.add(9);
+ tester.add(4);
+ tester.add(11);
+ tester.set(2, expected);
+ Integer actual = (Integer) tester.getArray()[2];
+ Assert.assertEquals(expected, actual);
+ }
+
+ @Test
+ public void clearTest1() {
+ MyArrayList tester = new MyArrayList();
+ tester.add("Scooby");
+ tester.add("Dooby");
+ tester.add("Do");
+ tester.clear();
+ int expected = 0;
+ int actual = tester.size();
+ Assert.assertEquals(expected, actual);
+ }
+
+ @Test
+ public void clearTest2() {
+ MyArrayList tester = new MyArrayList();
+ tester.add("Scooby");
+ tester.add("Dooby");
+ tester.add("Do");
+ tester.clear();
+ int expected = 10;
+ int actual = tester.getArray().length;
+ Assert.assertEquals(expected, actual);
+ }
+
+ @Test
+ public void clearTest3() {
+ MyArrayList tester = new MyArrayList();
+ tester.add("Scooby");
+ tester.add("Dooby");
+ tester.add("Do");
+ tester.clear();
+ Object expected = null;
+ Object actual = tester.get(1);
+ Assert.assertEquals(expected, actual);
+ }
+
+ @Test
+ public void isEmptyTest1() {
+ MyArrayList tester = new MyArrayList(8);
+ tester.add(14);
+ tester.add(7);
+ boolean expected = false;
+ boolean actual = tester.isEmpty();
+ Assert.assertEquals(expected, actual);
+ }
+
+ @Test
+ public void isEmptyTest2() {
+ MyArrayList tester = new MyArrayList(8);
+ tester.add(14);
+ tester.add(7);
+ tester.clear();
+ Assert.assertTrue(tester.isEmpty());
+ }
+
+ @Test
+ public void containsTest1() {
+ MyArrayList tester = new MyArrayList();
+ String thing = "Pinocchio";
+ tester.add(thing);
+ Assert.assertTrue(tester.contains(thing));
+ }
+
+ @Test
+ public void containsTest2() {
+ MyArrayList tester = new MyArrayList();
+ String thing = "Pinocchio";
+ String anotherThing = "Aladdin";
+ tester.add(thing);
+ Assert.assertFalse(tester.contains(anotherThing));
+ }
+
+}
diff --git a/src/test/java/MyMapTest.java b/src/test/java/MyMapTest.java
new file mode 100644
index 0000000..18fc65e
--- /dev/null
+++ b/src/test/java/MyMapTest.java
@@ -0,0 +1,50 @@
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+public class MyMapTest {
+
+ private MyMap tester;
+
+ @Before
+ public void setup() {
+ tester = new MyMap();
+ }
+
+ @Test
+ public void putTest() {
+ tester.put(1, "Red");
+ Assert.assertTrue(tester.containsKey(1));
+ Assert.assertTrue(tester.containsValue("Red"));
+ }
+
+ @Test
+ public void getTest() {
+ tester.put(2, "Orange");
+ Object expected = "Orange";
+ Object actual = tester.get(2);
+ Assert.assertEquals(expected, actual);
+ }
+
+ @Test
+ public void removeTest() {
+ tester.put(1, "Red");
+ tester.put(2, "Orange");
+ tester.put(3, "Yellow");
+ tester.remove(2);
+ Assert.assertFalse(tester.containsValue(2));
+ }
+
+ @Test
+ public void sizeTest() {
+ tester.put(1, "Red");
+ tester.put(2, "Orange");
+ tester.put(3, "Yellow");
+ tester.remove(2);
+ Integer expected = 2;
+ Integer actual = tester.size();
+ Assert.assertEquals(expected, actual);
+ }
+
+
+}
diff --git a/src/test/java/MySetTest.java b/src/test/java/MySetTest.java
new file mode 100644
index 0000000..e3d6875
--- /dev/null
+++ b/src/test/java/MySetTest.java
@@ -0,0 +1,175 @@
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+public class MySetTest {
+
+ private MySet tester;
+
+ @Before
+ public void setup() {
+ tester = new MySet();
+ }
+
+ @Test
+ public void addTest1() {
+ tester.add(14);
+ int expected = 1;
+ int actual = tester.getSet().size();
+ Assert.assertEquals(expected, actual);
+ }
+
+ @Test
+ public void addTest2() {
+ tester.add(14);
+ tester.add(11);
+ tester.add(14);
+ int expected = 2;
+ int actual = tester.getSet().size();
+ Assert.assertEquals(expected, actual);
+ }
+
+ @Test
+ public void addAllTest1() {
+ String[] stringArray = {"Scooby", "Dooby", "Do"};
+ tester.addAll(stringArray);
+ int expected = 3;
+ int actual = tester.getSet().size();
+ Assert.assertEquals(expected, actual);
+ }
+
+ @Test
+ public void addAllTest2() {
+ String[] stringArray = {"Scooby", "Scooby", "Do"};
+ tester.addAll(stringArray);
+ int expected = 2;
+ int actual = tester.getSet().size();
+ Assert.assertEquals(expected, actual);
+ }
+
+ @Test
+ public void clearTest() {
+ Integer[] intArray = {50, 25, 14, 11};
+ tester.addAll(intArray);
+ int expected = 0;
+ tester.clear();
+ int actual = tester.getSet().size();
+ Assert.assertEquals(expected, actual);
+ }
+
+ @Test
+ public void containsTest1() {
+ Object toAdd = new Object();
+ tester.add(toAdd);
+ Assert.assertTrue(tester.contains(toAdd));
+ }
+
+ @Test
+ public void containsTest2() {
+ String[] stringArray = {"Super", "Duper", "Fly"};
+ tester.addAll(stringArray);
+ String testing = "Duper";
+ boolean expected = true;
+ boolean actual = tester.contains(testing);
+ Assert.assertEquals(expected, actual);
+ }
+
+ @Test
+ public void containsAllTest1() {
+ tester.add("Marky");
+ tester.add("Ricky");
+ tester.add("Danny");
+ tester.add("Terri");
+ boolean expected = true;
+ String[] stringArray = {"Terri", "Ricky"};
+ boolean actual = tester.containsAll(stringArray);
+ Assert.assertEquals(expected, actual);
+ }
+
+ @Test
+ public void containsAllTest2() {
+ tester.add(14);
+ tester.add(11);
+ tester.add(7);
+ tester.add(99);
+ boolean expected = false;
+ Integer[] intArray = {7, 11, 16, 99};
+ boolean actual = tester.containsAll(intArray);
+ Assert.assertEquals(expected, actual);
+ }
+
+ @Test
+ public void isEmptyTest1() {
+ Integer[] intArray = {4, 8, 15, 16, 23, 42};
+ tester.addAll(intArray);
+ boolean expected = false;
+ boolean actual = tester.isEmpty();
+ Assert.assertEquals(expected, actual);
+ }
+
+ @Test
+ public void isEmptyTest2() {
+ boolean expected = true;
+ boolean actual = tester.isEmpty();
+ Assert.assertEquals(expected, actual);
+ }
+
+ @Test
+ public void removeTest1() {
+ String[] stringArray = {"Going", "up", "the", "river"};
+ tester.addAll(stringArray);
+ tester.remove("the");
+ boolean expected = false;
+ boolean actual = tester.contains("the");
+ Assert.assertEquals(expected, actual);
+ }
+
+ @Test
+ public void removeTest2() {
+ Integer input = 612;
+ Integer[] intArray = {98, 5, input, 17};
+ tester.addAll(intArray);
+ tester.remove(input);
+ boolean expected = false;
+ boolean actual = tester.contains(input);
+ Assert.assertEquals(expected, actual);
+ }
+
+ @Test
+ public void removeAllTest1() {
+ String[] stringArray = {"Going", "up", "the", "river"};
+ tester.addAll(stringArray);
+ tester.removeAll(stringArray);
+ int expected = 0;
+ int actual = tester.getSet().size();
+ Assert.assertEquals(expected, actual);
+ }
+
+ @Test
+ public void removeAllTest2() {
+ String[] stringArray = {"Going", "up", "the", "river"};
+ tester.addAll(stringArray);
+ tester.removeAll(stringArray);
+ Assert.assertFalse(tester.contains("the"));
+ }
+
+ @Test
+ public void sizeTest() {
+ Integer[] intArray = {645, 809, 765, 238};
+ tester.addAll(intArray);
+ int expected = 4;
+ int actual = tester.size();
+ Assert.assertEquals(expected, actual);
+ }
+
+ @Test
+ public void toArrayTest() {
+ Integer[] intArray = {645, 809, 765, 238};
+ tester.addAll(intArray);
+ Object[] expected = {645, 809, 765, 238};
+ Object[] actual = tester.toArray();
+ Assert.assertEquals(expected, actual);
+ }
+
+
+}