@Test
public void test10populateRangerPolicyConditionDefToXX() {

	RangerPolicyConditionDef rangerConditionDefvObj = new RangerPolicyConditionDef();
	rangerConditionDefvObj.setDescription("Countries");
	rangerConditionDefvObj.setEvaluator("COUNTRY");
	rangerConditionDefvObj.setLabel("Countries");
	rangerConditionDefvObj.setName("country");
	rangerConditionDefvObj.setRbKeyDescription(null);
	rangerConditionDefvObj.setRbKeyLabel(null);
	XXPolicyConditionDef policyConditionDefObj = new XXPolicyConditionDef();
	policyConditionDefObj.setAddedByUserId(Id);
	policyConditionDefObj.setCreateTime(new Date());
	policyConditionDefObj.setDefid(Id);
	policyConditionDefObj.setDescription("policy");
	policyConditionDefObj.setId(Id);
	policyConditionDefObj.setName("country");
	policyConditionDefObj.setOrder(0);
	policyConditionDefObj.setUpdatedByUserId(Id);
	policyConditionDefObj.setUpdateTime(new Date());
	XXServiceDef serviceDefObj = new XXServiceDef();
	serviceDefObj.setAddedByUserId(Id);
	serviceDefObj.setCreateTime(new Date());
	serviceDefObj.setDescription("HDFS Repository");
	serviceDefObj.setGuid("1427365526516_835_0");
	serviceDefObj.setId(Id);
	Mockito.when(
			(XXPolicyConditionDef) rangerAuditFields.populateAuditFields(
					policyConditionDefObj, serviceDefObj)).thenReturn(
			policyConditionDefObj);
	XXPolicyConditionDef dbPolicyConditionDef = rangerServiceDefService
			.populateRangerPolicyConditionDefToXX(rangerConditionDefvObj,
					policyConditionDefObj, serviceDefObj, 1);
	Assert.assertNotNull(dbPolicyConditionDef);
	Assert.assertEquals(dbPolicyConditionDef.getName(),
			policyConditionDefObj.getName());
	Assert.assertEquals(dbPolicyConditionDef.getDescription(),
			policyConditionDefObj.getDescription());
	Assert.assertEquals(dbPolicyConditionDef.getEvaluator(),
			policyConditionDefObj.getEvaluator());
	Assert.assertEquals(dbPolicyConditionDef.getLabel(),
			policyConditionDefObj.getLabel());
	Assert.assertEquals(dbPolicyConditionDef.getId(),
			policyConditionDefObj.getId());
	Assert.assertEquals(dbPolicyConditionDef.getRbkeydescription(),
			policyConditionDefObj.getRbkeydescription());
	Assert.assertEquals(dbPolicyConditionDef.getOrder(),
			policyConditionDefObj.getOrder());
	Assert.assertEquals(dbPolicyConditionDef.getUpdatedByUserId(),
			policyConditionDefObj.getUpdatedByUserId());
	Assert.assertEquals(dbPolicyConditionDef.getUpdateTime(),
			policyConditionDefObj.getUpdateTime());
}