@Test
public void testSourceNat() throws ConfigurationException, Exception {
long vlanId = 123;
IpAddressTO ip = new IpAddressTO(1, "1.2.3.4", true, false,
false, null, "1.2.3.1", "255.255.255.0", null, null, false);
SetSourceNatCommand cmd = new SetSourceNatCommand(ip, true);
cmd.setContextParam(NetworkElementCommand.GUEST_VLAN_TAG, Long.toString(vlanId));
cmd.setContextParam(NetworkElementCommand.GUEST_NETWORK_CIDR, "1.2.3.4/32");
_resource.setConnection(_connection);
when(_connection.login()).thenReturn(true);
when(_connection.createTenantVDCNatPolicySet(anyString())).thenReturn(true);
when(_connection.createTenantVDCSourceNatPolicy(anyString(), anyString())).thenReturn(true);