@Test
public void test10deleteSecurityZoneByWrongName() throws Exception {

	XXSecurityZone xxSecurityZone = new XXSecurityZone();
	xxSecurityZone.setId(2L);
	RangerSecurityZone securityZone = new RangerSecurityZone();
	securityZone.setId(2L);
	securityZone.setName("sz1");
	XXSecurityZoneDao xXSecurityZoneDao = Mockito.mock(XXSecurityZoneDao.class);
	Mockito.when(daoManager.getXXSecurityZoneDao()).thenReturn(xXSecurityZoneDao);
	Mockito.when(xXSecurityZoneDao.findByZoneName(securityZone.getName())).thenReturn(null);
	Mockito.when(restErrorUtil.createRESTException(Mockito.anyString())).thenThrow(new WebApplicationException());
	thrown.expect(WebApplicationException.class);
	securityZoneDBStore.deleteSecurityZoneByName(securityZone.getName());
	Mockito.verify(xXSecurityZoneDao, times(1)).findByZoneName(xxSecurityZone.getName());
}