@Test
public void test2updateSecurityZoneById() throws Exception {

	XXSecurityZone xxSecurityZone = new XXSecurityZone();
	xxSecurityZone.setId(2L);
	RangerSecurityZone securityZone = new RangerSecurityZone();
	securityZone.setId(2L);
	RangerSecurityZone updateSecurityZone = new RangerSecurityZone();
	updateSecurityZone.setId(2L);
	XXSecurityZoneDao xXSecurityZoneDao = Mockito.mock(XXSecurityZoneDao.class);
	XXGlobalStateDao xXGlobalStateDao = Mockito.mock(XXGlobalStateDao.class);
	Mockito.when(daoManager.getXXSecurityZoneDao()).thenReturn(xXSecurityZoneDao);
	Mockito.when(xXSecurityZoneDao.findByZoneId(securityZone.getId())).thenReturn(xxSecurityZone);
	Mockito.when(daoManager.getXXGlobalState()).thenReturn(xXGlobalStateDao);
	Mockito.doNothing().when(xXGlobalStateDao).onGlobalStateChange(RANGER_GLOBAL_STATE_NAME);
	Mockito.when(securityZoneService.update(securityZone)).thenReturn(updateSecurityZone);
	Mockito.doNothing().when(securityZoneRefUpdater).createNewZoneMappingForRefTable(updateSecurityZone);
	List<XXTrxLog> trxLogList = new ArrayList<XXTrxLog>();
	Mockito.doNothing().when(bizUtil).createTrxLog(trxLogList);
	RangerSecurityZone expectedSecurityZone = securityZoneDBStore.updateSecurityZoneById(securityZone);
	Assert.assertNotNull(xxSecurityZone);
	Assert.assertEquals(updateSecurityZone.getId(), expectedSecurityZone.getId());
	Mockito.verify(daoManager).getXXSecurityZoneDao();
	Mockito.verify(daoManager).getXXGlobalState();
	Mockito.verify(securityZoneService).update(securityZone);
}