try { ArrayUtils.toMap(null); fail("exception expected"); } catch (IllegalArgumentException ex) {}
assertEquals(null, ArrayUtils.toMap(null));
    public void testToMap() {        Map map = ArrayUtils.toMap(new String[][] {{"foo", "bar"}, {"hello", "world"}});                assertEquals("bar", map.get("foo"));        assertEquals("world", map.get("hello"));                try {            ArrayUtils.toMap(null);            fail("exception expected");        } catch (IllegalArgumentException ex) {}        try {            ArrayUtils.toMap(new String[][] {{"foo", "bar"}, {"short"}});            fail("exception expected");        } catch (IllegalArgumentException ex) {}        try {            ArrayUtils.toMap(new Object[] {new Object[] {"foo", "bar"}, "illegal type"});            fail("exception expected");        } catch (IllegalArgumentException ex) {}        try {            ArrayUtils.toMap(new Object[] {new Object[] {"foo", "bar"}, null});            fail("exception expected");        } catch (IllegalArgumentException ex) {}                map = ArrayUtils.toMap(new Object[] {new Map.Entry() {            public Object getKey() {                return "foo";            }            public Object getValue() {                return "bar";            }            public Object setValue(Object value) {                throw new UnsupportedOperationException();            }            public boolean equals(Object o) {                throw new UnsupportedOperationException();            }            public int hashCode() {                throw new UnsupportedOperationException();            }        }});        assertEquals("bar", map.get("foo"));    }