public static <V, K> Map<K, V> toIdentityMap(Collection<V> collection, Function<V, K> key) {
		return toIdentityMap(collection, key, false);
	}
@Test
	public void testToIdentityMap() {
		Map<Long, Student> map = CollStreamUtil.toIdentityMap(null, Student::getStudentId);
		assertEquals(map, Collections.EMPTY_MAP);
		List<Student> list = new ArrayList<>();
		map = CollStreamUtil.toIdentityMap(list, Student::getStudentId);
		assertEquals(map, Collections.EMPTY_MAP);
		list.add(new Student(1, 1, 1, "张三"));
		list.add(new Student(1, 1, 2, "李四"));
		list.add(new Student(1, 1, 3, "王五"));
		map = CollStreamUtil.toIdentityMap(list, Student::getStudentId);
		assertEquals(map.get(1L).getName(), "张三");
		assertEquals(map.get(2L).getName(), "李四");
		assertEquals(map.get(3L).getName(), "王五");
		assertNull(map.get(4L));

		// 测试value为空时
		list.add(null);
		map = CollStreamUtil.toIdentityMap(list, Student::getStudentId);
		assertNull(map.get(4L));
	}