package seedu.ezdo.model.task;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.when;

import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;

import seedu.ezdo.model.tag.Tag;
import seedu.ezdo.model.tag.UniqueTagList;
import seedu.ezdo.model.tag.UniqueTagList.DuplicateTagException;

public class UniqueTagListTest {

    @Rule
    public ExpectedException thrown = ExpectedException.none();

    @Test
    public void add_duplicate_throwsDuplicateTagException() throws Exception {
        thrown.expect(DuplicateTagException.class);
        UniqueTagList spy = spy(UniqueTagList.class);
        Tag tag = new Tag("lol");
        when(spy.contains(tag)).thenReturn(true);
        spy.add(tag);
    }

    @Test
    public void equals_same_true() {
        UniqueTagList utl = new UniqueTagList();
        assertTrue(utl.equals(utl));
    }

    @Test
    public void equals_notUtl_false() {
        UniqueTagList utl = new UniqueTagList();
        assertFalse(utl.equals(new Integer(1)));
    }
}

@@ -188,24 +188,48 @@
 kito.when;%0A%0A
+import java.util.List;%0A%0A
 import org.j
@@ -304,16 +304,290 @@
 eption;%0A
+import org.junit.runner.RunWith;%0Aimport org.mockito.Mockito;%0Aimport org.powermock.api.mockito.PowerMockito;%0Aimport org.powermock.core.classloader.annotations.PrepareForTest;%0Aimport org.powermock.modules.junit4.PowerMockRunner;%0A%0Aimport seedu.ezdo.commons.util.CollectionUtil;
 %0Aimport 
@@ -721,16 +721,88 @@
 ption;%0A%0A
+@RunWith(PowerMockRunner.class)%0A@PrepareForTest(%7BCollectionUtil.class%7D)%0A
 public c
@@ -1202,32 +1202,394 @@
 dd(tag);%0A    %7D%0A%0A
+    @Test%0A    public void construct_duplicate_throwsDuplicateTagException() throws Exception %7B%0A        thrown.expect(DuplicateTagException.class);%0A        PowerMockito.spy(CollectionUtil.class);%0A        PowerMockito.doReturn(false).when(CollectionUtil.class, %22elementsAreUnique%22, Mockito.any(List.class));%0A        new UniqueTagList(new Tag(%22omgwtfbbq%22));%0A    %7D%0A%0A
     @Test%0A    pu

Add UniqueTagList tests