VlanDao fakeVlanDao = mock(VlanDao.class);
when(fakeVlanDao.findById(anyLong())).thenReturn(mock(VlanVO.class));
modelImpl._vlanDao = fakeVlanDao;
when(fakeSearch.create()).thenReturn(mock(SearchCriteria.class));
when(ipAddressDao.search(any(SearchCriteria.class), (Filter)org.mockito.Matchers.isNull())).thenReturn(fakeList);
when(ipAddressDao.findById(anyLong())).thenReturn(fakeIp);
Account fakeAccount = mock(Account.class);
when(fakeAccount.getId()).thenReturn(1L);
Network fakeNetwork = mock(Network.class);
when(fakeNetwork.getId()).thenReturn(1L);
PublicIpAddress answer = modelImpl.getSourceNatIpAddressForGuestNetwork(fakeAccount, fakeNetwork);