public MockSubnet createSubnet ( final String cidrBlock , final String vpcId ) { MockSubnet ret = new MockSubnet ( ) ; ret . setCidrBlock ( cidrBlock ) ; ret . setSubnetId ( "subnet-" + UUID . randomUUID ( ) . toString ( ) . substring ( 0 , SUBNET_ID_POSTFIX_LENGTH ) ) ; ret . setVpcId ( vpcId ) ; allMockSubnets . put ( ret . getSubnetId ( ) , ret ) ; return ret ; }
Create the mock Subnet .