@@ -0,0 +1,2306 @@
+package seedu.addressbook.common;%0A%0Aimport static org.junit.Assert.assertFalse;%0Aimport static org.junit.Assert.assertTrue;%0A%0Aimport java.util.Arrays;%0Aimport java.util.List;%0A%0Aimport org.junit.Test;%0A%0Apublic class UtilsTest %7B%0A    @Test%0A    public void isAnyNull() %7B%0A        // empty list%0A        assertFalse(Utils.isAnyNull());%0A%0A        // Any non-empty list%0A        assertFalse(Utils.isAnyNull(new Object(), new Object()));%0A        assertFalse(Utils.isAnyNull(%22test%22));%0A        assertFalse(Utils.isAnyNull(%22%22));%0A%0A        // non empty list with just one null at the beginning%0A        assertTrue(Utils.isAnyNull((Object) null));%0A        assertTrue(Utils.isAnyNull(null, %22%22, new Object()));%0A        assertTrue(Utils.isAnyNull(null, new Object(), new Object()));%0A%0A        // non empty list with nulls in the middle%0A        assertTrue(Utils.isAnyNull(new Object(), null, null, %22test%22));%0A        assertTrue(Utils.isAnyNull(%22%22, null, new Object()));%0A%0A        // non empty list with one null as the last element%0A        assertTrue(Utils.isAnyNull(%22%22, new Object(), null));%0A        assertTrue(Utils.isAnyNull(new Object(), new Object(), null));%0A%0A        // confirms nulls inside the list are not considered%0A        List%3CObject%3E nullList = Arrays.asList((Object) null);%0A        assertFalse(Utils.isAnyNull(nullList));%0A    %7D%0A%0A    @Test%0A    public void elementsAreUnique() throws Exception %7B%0A        // empty list%0A        assertAreUnique();%0A%0A        // only one object%0A        assertAreUnique((Object) null);%0A        assertAreUnique(1);%0A        assertAreUnique(%22%22);%0A        assertAreUnique(%22abc%22);%0A%0A        // all objects unique%0A        assertAreUnique(%22abc%22, %22ab%22, %22a%22);%0A        assertAreUnique(1, 2);%0A%0A        // some identical objects%0A        assertNotUnique(%22abc%22, %22abc%22);%0A        assertNotUnique(%22abc%22, %22%22, %22abc%22, %22ABC%22);%0A        assertNotUnique(%22%22, %22abc%22, %22a%22, %22abc%22);%0A        assertNotUnique(1, new Integer(1));%0A        assertNotUnique(null, 1, new Integer(1));%0A        assertNotUnique(null, null);%0A        assertNotUnique(null, %22a%22, %22b%22, null);%0A    %7D%0A%0A    private void assertAreUnique(Object... objects) %7B%0A        assertTrue(Utils.elementsAreUnique(Arrays.asList(objects)));%0A    %7D%0A%0A    private void assertNotUnique(Object... objects) %7B%0A        assertFalse(Utils.elementsAreUnique(Arrays.asList(objects)));%0A    %7D%0A%7D%0A

Add unit tests for Utils class (#127)