private static boolean equal(Object expected, Object actual)
    {
        if (expected == null)
        {
            if (actual == null)
            {
                return true;
            }
            return actual.equals(expected);
        }
        if (expected instanceof Object[])
        {
            if (actual instanceof Object[])
            {
                return Arrays.equals((Object[])expected, (Object[])actual);
            }
            return false;
        }
        if (expected instanceof int[])
        {
            if (actual instanceof int[])
            {
                return Arrays.equals((int[])expected, (int[])actual);
            }
            return false;
        }
        return expected.equals(actual);
    }