// Path: src/main/java/com/cedarsoftware/util/DeepEquals.java
// public static boolean deepEquals(Object a, Object b)
// {
//     return deepEquals(a, b, new HashMap());
// }
// 
// Path: src/main/java/com/cedarsoftware/util/GraphComparator.java
// public enum Command
// {
//     ARRAY_SET_ELEMENT("array.setElement"),
//     ARRAY_RESIZE("array.resize"),
//     OBJECT_ASSIGN_FIELD("object.assignField"),
//     OBJECT_ORPHAN("object.orphan"),
//     OBJECT_FIELD_TYPE_CHANGED("object.fieldTypeChanged"),
//     SET_ADD("set.add"),
//     SET_REMOVE("set.remove"),
//     MAP_PUT("map.put"),
//     MAP_REMOVE("map.remove"),
//     LIST_RESIZE("list.resize"),
//     LIST_SET_ELEMENT("list.setElement");
// 
//     private String name;
//     Command(final String name)
//     {
//         this.name = name.intern();
//     }
// 
//     public String getName()
//     {
//         return name;
//     }
// 
//     public static Command fromName(String name)
//     {
//         if (name == null || "".equals(name.trim()))
//         {
//             throw new IllegalArgumentException("Name is required for Command.forName()");
//         }
// 
//         name = name.toLowerCase();
//         for (Command t : Command.values())
//         {
//             if (t.getName().equals(name))
//             {
//                 return t;
//             }
//         }
// 
//         throw new IllegalArgumentException("Unknown Command enum: " + name);
//     }
// }


import com.cedarsoftware.util.io.JsonReader;
import com.cedarsoftware.util.io.JsonWriter;
import org.junit.Test;
import java.util.*;
import static com.cedarsoftware.util.DeepEquals.deepEquals;
import static com.cedarsoftware.util.GraphComparator.Delta.Command.*;
import static org.junit.Assert.*;
        private final String name;
        private final int age;
        private final List<Pet> pets = new ArrayList<>();

        private UnidentifiedObject(String name, int age)
        {
            this.name = name;
            this.age = age;
        }

        public void addPet(Pet p)
        {
            pets.add(p);
        }
    }

    @Test
    public void testAlpha()
    {
        // TODO: Need to find faster way to get last IP address (problem for unique id generator, not GraphComparator)
        UniqueIdGenerator.getUniqueId();
    }

    @Test
    public void testSimpleObjectDifference() throws Exception
    {
        Person[] persons = createTwoPersons();
        long id = persons[0].id;
        Person p2 = persons[1];
        p2.first = "Jack";
// Path: src/main/java/com/cedarsoftware/util/DeepEquals.java
// public static boolean deepEquals(Object a, Object b)
// {
//     return deepEquals(a, b, new HashMap());
// }
// 
// Path: src/main/java/com/cedarsoftware/util/GraphComparator.java
// public enum Command
// {
//     ARRAY_SET_ELEMENT("array.setElement"),
//     ARRAY_RESIZE("array.resize"),
//     OBJECT_ASSIGN_FIELD("object.assignField"),
//     OBJECT_ORPHAN("object.orphan"),
//     OBJECT_FIELD_TYPE_CHANGED("object.fieldTypeChanged"),
//     SET_ADD("set.add"),
//     SET_REMOVE("set.remove"),
//     MAP_PUT("map.put"),
//     MAP_REMOVE("map.remove"),
//     LIST_RESIZE("list.resize"),
//     LIST_SET_ELEMENT("list.setElement");
// 
//     private String name;
//     Command(final String name)
//     {
//         this.name = name.intern();
//     }
// 
//     public String getName()
//     {
//         return name;
//     }
// 
//     public static Command fromName(String name)
//     {
//         if (name == null || "".equals(name.trim()))
//         {
//             throw new IllegalArgumentException("Name is required for Command.forName()");
//         }
// 
//         name = name.toLowerCase();
//         for (Command t : Command.values())
//         {
//             if (t.getName().equals(name))
//             {
//                 return t;
//             }
//         }
// 
//         throw new IllegalArgumentException("Unknown Command enum: " + name);
//     }
// }


// Path: src/test/java/com/cedarsoftware/util/TestGraphComparator.java
import com.cedarsoftware.util.io.JsonReader;
import com.cedarsoftware.util.io.JsonWriter;
import org.junit.Test;
import java.util.*;
import static com.cedarsoftware.util.DeepEquals.deepEquals;
import static com.cedarsoftware.util.GraphComparator.Delta.Command.*;
import static org.junit.Assert.*;

        private final String name;
        private final int age;
        private final List<Pet> pets = new ArrayList<>();

        private UnidentifiedObject(String name, int age)
        {
            this.name = name;
            this.age = age;
        }

        public void addPet(Pet p)
        {
            pets.add(p);
        }
    }

    @Test
    public void testAlpha()
    {
        // TODO: Need to find faster way to get last IP address (problem for unique id generator, not GraphComparator)
        UniqueIdGenerator.getUniqueId();
    }

    @Test
    public void testSimpleObjectDifference() throws Exception
    {
        Person[] persons = createTwoPersons();
        long id = persons[0].id;
        Person p2 = persons[1];
        p2.first = "Jack";
        assertFalse(deepEquals(persons[0], persons[1]));