@Test public void testChainListenerTransformations() { assertThat(chainListenerTransformations(ImmutableList.of()), equalTo(FINAL_TRANSFORMATION)); AclLineMatchExpr matchExpr = new MatchHeaderSpace( HeaderSpace.builder().setDstIps(Prefix.parse("1.1.1.1/32").toIpSpace()).build()); assertThat( chainListenerTransformations( ImmutableList.of(new LoadBalancerTransformation(matchExpr, Noop.NOOP_SOURCE_NAT))), equalTo( new Transformation( matchExpr, ImmutableList.of(Noop.NOOP_SOURCE_NAT), null, FINAL_TRANSFORMATION))); }
@Nonnull @VisibleForTesting static Transformation chainListenerTransformations( List<LoadBalancerTransformation> listenerTransformations) { Transformation tailTransformation = FINAL_TRANSFORMATION; for (int index = listenerTransformations.size() - 1; index >= 0; index--) { tailTransformation = listenerTransformations.get(index).toTransformation(tailTransformation); } return tailTransformation; }
LoadBalancer implements AwsVpcEntity, Serializable { @Nonnull @VisibleForTesting static Transformation chainListenerTransformations( List<LoadBalancerTransformation> listenerTransformations) { Transformation tailTransformation = FINAL_TRANSFORMATION; for (int index = listenerTransformations.size() - 1; index >= 0; index--) { tailTransformation = listenerTransformations.get(index).toTransformation(tailTransformation); } return tailTransformation; } }
LoadBalancer implements AwsVpcEntity, Serializable { @Nonnull @VisibleForTesting static Transformation chainListenerTransformations( List<LoadBalancerTransformation> listenerTransformations) { Transformation tailTransformation = FINAL_TRANSFORMATION; for (int index = listenerTransformations.size() - 1; index >= 0; index--) { tailTransformation = listenerTransformations.get(index).toTransformation(tailTransformation); } return tailTransformation; } LoadBalancer(
      String arn,
      List<AvailabilityZone> availabilityZones,
      String dnsName,
      String name,
      Scheme scheme,
      Type type,
      String vpcId); }
LoadBalancer implements AwsVpcEntity, Serializable { @Nonnull @VisibleForTesting static Transformation chainListenerTransformations( List<LoadBalancerTransformation> listenerTransformations) { Transformation tailTransformation = FINAL_TRANSFORMATION; for (int index = listenerTransformations.size() - 1; index >= 0; index--) { tailTransformation = listenerTransformations.get(index).toTransformation(tailTransformation); } return tailTransformation; } LoadBalancer(
      String arn,
      List<AvailabilityZone> availabilityZones,
      String dnsName,
      String name,
      Scheme scheme,
      Type type,
      String vpcId); @Override String getId(); @Nonnull List<AvailabilityZone> getAvailabilityZones(); @Nonnull String getDnsName(); @Nonnull String getName(); @Nonnull Scheme getScheme(); @Nonnull Type getType(); @Nonnull String getVpcId(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
LoadBalancer implements AwsVpcEntity, Serializable { @Nonnull @VisibleForTesting static Transformation chainListenerTransformations( List<LoadBalancerTransformation> listenerTransformations) { Transformation tailTransformation = FINAL_TRANSFORMATION; for (int index = listenerTransformations.size() - 1; index >= 0; index--) { tailTransformation = listenerTransformations.get(index).toTransformation(tailTransformation); } return tailTransformation; } LoadBalancer(
      String arn,
      List<AvailabilityZone> availabilityZones,
      String dnsName,
      String name,
      Scheme scheme,
      Type type,
      String vpcId); @Override String getId(); @Nonnull List<AvailabilityZone> getAvailabilityZones(); @Nonnull String getDnsName(); @Nonnull String getName(); @Nonnull Scheme getScheme(); @Nonnull Type getType(); @Nonnull String getVpcId(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }