Account account = new AccountVO("testaccount", 1, "networkdomain", (short)0, UUID.randomUUID().toString());
when(configurationMgr._accountMgr.getAccount(anyLong())).thenReturn(account);
when(configurationMgr._accountDao.findActiveAccount(anyString(), anyLong())).thenReturn(account);
when(configurationMgr._accountMgr.getActiveAccountById(anyLong())).thenReturn(account);
UserVO user = new UserVO(1, "testuser", "password", "firstname", "lastName", "email", "timezone", UUID.randomUUID().toString());
CallContext.register(user, account);
when(configurationMgr._publicIpAddressDao.countIPs(anyLong(), anyLong(), anyBoolean())).thenReturn(1);
doNothing().when(configurationMgr._resourceLimitMgr).checkResourceLimit(any(Account.class), any(ResourceType.class), anyLong());