@Test public void testMultipleSteps() { Ip dstPoolIp = Ip.parse("1.1.1.1"); Ip srcPoolIp = Ip.parse("2.2.2.2"); Transformation transformation = always() .apply(assignDestinationIp(dstPoolIp, dstPoolIp), assignSourceIp(srcPoolIp, srcPoolIp)) .build(); Transition transition = _toTransition.toTransition(transformation); BDD dstPoolIpBdd = _pkt.getDstIp().value(dstPoolIp.asLong()); BDD srcPoolIpBdd = _pkt.getSrcIp().value(srcPoolIp.asLong()); assertThat(transition.transitForward(_one), equalTo(dstPoolIpBdd.and(srcPoolIpBdd))); }
public Transition toTransition(@Nullable Transformation transformation) { return transformation == null ? IDENTITY : _cache.computeIfAbsent(transformation, this::computeTransition); }
TransformationToTransition { public Transition toTransition(@Nullable Transformation transformation) { return transformation == null ? IDENTITY : _cache.computeIfAbsent(transformation, this::computeTransition); } }
TransformationToTransition { public Transition toTransition(@Nullable Transformation transformation) { return transformation == null ? IDENTITY : _cache.computeIfAbsent(transformation, this::computeTransition); } TransformationToTransition(BDDPacket bddPacket, IpAccessListToBdd ipAccessListToBdd); }
TransformationToTransition { public Transition toTransition(@Nullable Transformation transformation) { return transformation == null ? IDENTITY : _cache.computeIfAbsent(transformation, this::computeTransition); } TransformationToTransition(BDDPacket bddPacket, IpAccessListToBdd ipAccessListToBdd); Transition toTransition(@Nullable Transformation transformation); Transition toReturnFlowTransition(@Nullable Transformation transformation); }
TransformationToTransition { public Transition toTransition(@Nullable Transformation transformation) { return transformation == null ? IDENTITY : _cache.computeIfAbsent(transformation, this::computeTransition); } TransformationToTransition(BDDPacket bddPacket, IpAccessListToBdd ipAccessListToBdd); Transition toTransition(@Nullable Transformation transformation); Transition toReturnFlowTransition(@Nullable Transformation transformation);  }