package seedu.addressbook.common;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

import java.util.Arrays;
import java.util.List;

import org.junit.Test;

public class UtilsTest {


    @Test
    public void elementsAreUnique() throws Exception {
        // empty list
        assertAreUnique();

        // only one object
        assertAreUnique((Object) null);
        assertAreUnique(1);
        assertAreUnique("");
        assertAreUnique("abc");

        // all objects unique
        assertAreUnique("abc", "ab", "a");
        assertAreUnique(1, 2);

        // some identical objects
        assertNotUnique("abc", "abc");
        assertNotUnique("abc", "", "abc", "ABC");
        assertNotUnique("", "abc", "a", "abc");
        assertNotUnique(1, Integer.valueOf(1));
        assertNotUnique(null, 1, Integer.valueOf(1));
        assertNotUnique(null, null);
        assertNotUnique(null, "a", "b", null);
    }

    private void assertAreUnique(Object... objects) {
        assertTrue(Utils.elementsAreUnique(Arrays.asList(objects)));
    }

    private void assertNotUnique(Object... objects) {
        assertFalse(Utils.elementsAreUnique(Arrays.asList(objects)));
    }
}

@@ -949,32 +949,717 @@
 , null);%0A    %7D%0A%0A
+    @Test%0A    public void isAnyNull() %7B%0A        // no items%0A        assertFalse(Utils.isAnyNull());%0A%0A        // varargs array that is null (i.e. no array)%0A        assertFalse(Utils.isAnyNull((Object%5B%5D) null));%0A%0A        // one item which is null (i.e. an array with one null item)%0A        assertTrue(Utils.isAnyNull((Object) null));%0A%0A        // at least one item, none of which are null%0A        assertFalse(Utils.isAnyNull(%22A%22));%0A        assertFalse(Utils.isAnyNull(%22A%22, %22%22));%0A        assertFalse(Utils.isAnyNull(1, 2, %22C%22));%0A%0A        // at least one item, some of which are null%0A        assertTrue(Utils.isAnyNull(null, 1));%0A        assertTrue(Utils.isAnyNull(%22A%22, null, %22C%22));%0A    %7D%0A%0A
     private void

Add test for isAnyNull