public static boolean isCommonFieldsEqual(Object source, Object target, String... ignoreProperties) {

		if (null == source && null == target) {
			return true;
		}
		if (null == source || null == target) {
			return false;
		}

		final Map<String, Object> sourceFieldsMap = BeanUtil.beanToMap(source);
		final Map<String, Object> targetFieldsMap = BeanUtil.beanToMap(target);

		final Set<String> sourceFields = sourceFieldsMap.keySet();
		sourceFields.removeAll(Arrays.asList(ignoreProperties));

		for (String field : sourceFields) {
			if(sourceFieldsMap.containsKey(field) && targetFieldsMap.containsKey(field)){
				if (ObjectUtil.notEqual(sourceFieldsMap.get(field), targetFieldsMap.get(field))) {
					return false;
				}
			}
		}

		return true;
	}
@Test
	public void isCommonFieldsEqualTest() {
		final TestUserEntity userEntity = new TestUserEntity();
		final TestUserDTO userDTO = new TestUserDTO();

		userDTO.setAge(20);
		userDTO.setName("takaki");
		userDTO.setSex(1);
		userDTO.setMobile("17812312023");

		BeanUtil.copyProperties(userDTO, userEntity);

		assertTrue(BeanUtil.isCommonFieldsEqual(userDTO, userEntity));

		userEntity.setAge(13);
		assertFalse(BeanUtil.isCommonFieldsEqual(userDTO, userEntity));
		assertTrue(BeanUtil.isCommonFieldsEqual(userDTO, userEntity, "age"));

		assertTrue(BeanUtil.isCommonFieldsEqual(null, null));
		assertFalse(BeanUtil.isCommonFieldsEqual(null, userEntity));
		assertFalse(BeanUtil.isCommonFieldsEqual(userEntity, null));

		userEntity.setSex(0);
		assertTrue(BeanUtil.isCommonFieldsEqual(userDTO, userEntity, "age", "sex"));
	}