public static Object[][] toObjectArray(Map<?, ?> map) {
		if (map == null) {
			return null;
		}
		final Object[][] result = new Object[map.size()][2];
		if (map.isEmpty()) {
			return result;
		}
		int index = 0;
		for (Entry<?, ?> entry : map.entrySet()) {
			result[index][0] = entry.getKey();
			result[index][1] = entry.getValue();
			index++;
		}
		return result;
	}
@Test
	public void toObjectArrayTest() {
		final Map<String, String> map = MapUtil.newHashMap(true);
		map.put("a", "1");
		map.put("b", "2");
		map.put("c", "3");
		map.put("d", "4");

		final Object[][] objectArray = MapUtil.toObjectArray(map);
		assertEquals("a", objectArray[0][0]);
		assertEquals("1", objectArray[0][1]);
		assertEquals("b", objectArray[1][0]);
		assertEquals("2", objectArray[1][1]);
		assertEquals("c", objectArray[2][0]);
		assertEquals("3", objectArray[2][1]);
		assertEquals("d", objectArray[3][0]);
		assertEquals("4", objectArray[3][1]);
	}