@Test
public void test16populateRangerEnumDefToXX() {

	RangerEnumDef rangerEnumDefObj = new RangerEnumDef();
	rangerEnumDefObj.setName("authnType");
	rangerEnumDefObj.setDefaultIndex(0);
	XXEnumDef enumDefObj = new XXEnumDef();
	enumDefObj.setAddedByUserId(Id);
	enumDefObj.setCreateTime(new Date());
	enumDefObj.setDefaultindex(0);
	enumDefObj.setDefid(Id);
	enumDefObj.setId(Id);
	enumDefObj.setName("authnType");
	enumDefObj.setUpdatedByUserId(Id);
	enumDefObj.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(
			(XXEnumDef) rangerAuditFields.populateAuditFields(enumDefObj,
					serviceDefObj)).thenReturn(enumDefObj);
	XXEnumDef dbEnumDef = rangerServiceDefService
			.populateRangerEnumDefToXX(rangerEnumDefObj, enumDefObj,
					serviceDefObj,1);
	Assert.assertNotNull(dbEnumDef);
	Assert.assertEquals(dbEnumDef, enumDefObj);
	Assert.assertEquals(dbEnumDef.getName(), enumDefObj.getName());
	Assert.assertEquals(dbEnumDef.getDefid(), enumDefObj.getDefid());
	Assert.assertEquals(dbEnumDef.getId(), enumDefObj.getId());
	Assert.assertEquals(dbEnumDef.getCreateTime(),
			enumDefObj.getCreateTime());
}