@Test
public void test6populateXXToRangerResourceDef() {

	XXResourceDefDao xResourceDefDao = Mockito.mock(XXResourceDefDao.class);
	XXResourceDef resourceDefObj = new XXResourceDef();
	resourceDefObj.setAddedByUserId(Id);
	resourceDefObj.setCreateTime(new Date());
	resourceDefObj.setDefid(Id);
	resourceDefObj.setDescription("HDFS Repository");
	resourceDefObj.setId(Id);
	Mockito.when(daoManager.getXXResourceDef()).thenReturn(xResourceDefDao);
	RangerResourceDef dbRangerResourceDef = rangerServiceDefService
			.populateXXToRangerResourceDef(resourceDefObj);
	Assert.assertNotNull(dbRangerResourceDef);
	Assert.assertEquals(dbRangerResourceDef.getName(),
			resourceDefObj.getName());
	Assert.assertEquals(dbRangerResourceDef.getDescription(),
			resourceDefObj.getDescription());
	Assert.assertEquals(dbRangerResourceDef.getType(),
			resourceDefObj.getType());
	Assert.assertEquals(dbRangerResourceDef.getRbKeyDescription(),
			resourceDefObj.getRbkeydescription());
	Mockito.verify(daoManager).getXXResourceDef();
}