@Test
public void test3deleteSecurityZoneByName() 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);
	XXGlobalStateDao xXGlobalStateDao = Mockito.mock(XXGlobalStateDao.class);
	Mockito.when(daoManager.getXXSecurityZoneDao()).thenReturn(xXSecurityZoneDao);
	Mockito.when(xXSecurityZoneDao.findByZoneName(securityZone.getName())).thenReturn(xxSecurityZone);
	Mockito.when(securityZoneService.read(securityZone.getId())).thenReturn(securityZone);
	Mockito.when(daoManager.getXXGlobalState()).thenReturn(xXGlobalStateDao);
	Mockito.doNothing().when(xXGlobalStateDao).onGlobalStateChange(RANGER_GLOBAL_STATE_NAME);
	Mockito.when(securityZoneRefUpdater.cleanupRefTables(securityZone)).thenReturn(true);
	Mockito.when(securityZoneService.delete(securityZone)).thenReturn(true);
	List<XXTrxLog> trxLogList = new ArrayList<XXTrxLog>();
	Mockito.doNothing().when(bizUtil).createTrxLog(trxLogList);
	securityZoneDBStore.deleteSecurityZoneByName(securityZone.getName());
	Assert.assertNotNull(xxSecurityZone);
}