class AwsSubnetIgwExplorer {

    public boolean hasInternetGatewayOfSubnet(DescribeRouteTablesResult describeRouteTablesResult, String subnetId) {
        Optional<RouteTable> routeTable = getRouteTableForSubnet(describeRouteTablesResult, subnetId);
        return hasInternetGateway(routeTable, subnetId);
    }

}