@Test
public void test89deleteXAuditMap() {

	destroySession();
	setup();
	VXResource vxresource=new VXResource();
	XXAuditMapDao xXAuditMapDao = Mockito.mock(XXAuditMapDao.class);
	Mockito.when(daoManager.getXXAuditMap()).thenReturn(xXAuditMapDao);
	VXAuditMap vXAuditMap=getVXAuditMap();
	XXAuditMap xXAuditMap=new XXAuditMap();
	xXAuditMap.setId(vXAuditMap.getId());
	xXAuditMap.setResourceId(vXAuditMap.getResourceId());
	Mockito.when(xXAuditMapDao.getById(vXAuditMap.getId())).thenReturn(xXAuditMap);
	Mockito.when(xResourceService.readResource(xXAuditMap.getResourceId())).thenReturn(vxresource);
	Mockito.when(xAuditMapService.deleteResource(Mockito.anyLong())).thenReturn(true);
	xUserMgr.deleteXAuditMap(vXAuditMap.getId(),true);
	Mockito.when(xResourceService.readResource(xXAuditMap.getResourceId())).thenReturn(null);
	Mockito.when(restErrorUtil.createRESTException("Invalid Input Data - No resource found with Id: " + xXAuditMap.getResourceId(), MessageEnums.INVALID_INPUT_DATA)).thenThrow(new WebApplicationException());
	thrown.expect(WebApplicationException.class);
	xUserMgr.deleteXAuditMap(vXAuditMap.getId(),true);
}