public MockInternetGateway attachInternetGateway ( final String internetgatewayId , final String vpcId ) { if ( internetgatewayId == null ) { return null ; } MockInternetGateway ret = allMockInternetGateways . get ( internetgatewayId ) ; if ( ret != null ) { MockInternetGatewayAttachmentType internetGatewayAttachmentType = new MockInternetGatewayAttachmentType ( ) ; internetGatewayAttachmentType . setVpcId ( vpcId ) ; internetGatewayAttachmentType . setState ( "Available" ) ; List < MockInternetGatewayAttachmentType > internetGatewayAttachmentSet = new ArrayList < MockInternetGatewayAttachmentType > ( ) ; internetGatewayAttachmentSet . add ( internetGatewayAttachmentType ) ; ret . setAttachmentSet ( internetGatewayAttachmentSet ) ; allMockInternetGateways . put ( ret . getInternetGatewayId ( ) , ret ) ; } return ret ; }
Attach the mock InternetGateway .