@Test
public void testFindSourceNatIP() throws InsufficientAddressCapacityException, ConcurrentOperationException {

    // Prepare
    final PublicIp publicIp = mock(PublicIp.class);
    when(vpcMgr.assignSourceNatIpAddressToVpc(mockOwner, mockVpc)).thenReturn(publicIp);
    // Execute
    deployment.findSourceNatIP();
    final VpcRouterDeploymentDefinition vpcDeployment = (VpcRouterDeploymentDefinition) deployment;
    if (vpcDeployment.hasSourceNatService()) {
        // Assert an ip address when we do have sourceNat service
        assertEquals("SourceNatIp returned by the VpcManager was not correctly set", publicIp, deployment.sourceNatIp);
    } else {
        // Assert null when we have no sourceNat service
        assertEquals("SourceNatIp returned by the VpcManager was not correctly set", null, deployment.sourceNatIp);
    }
}