flowStates, processBuilder(fragmentOffsets, VALID_FRAGMENT_OFFSET), new IpProtocolSpecifier(ipProtocols).getProtocols(), srcIps, dstIps,
@Test public void testConstructorValidJsonNode() throws IOException { JsonNode jsonNode = _mapper.readTree("[\"89 (OSpf)\", \"61\", \"chaos\"]"); assertThat( new IpProtocolSpecifier(jsonNode).getProtocols(), equalTo( ImmutableSet.of( IpProtocol.OSPF, IpProtocol.CHAOS, IpProtocol.ANY_HOST_INTERNAL_PROTOCOL))); }
@Test public void testConstructorValid() { assertThat( new IpProtocolSpecifier("89 (OSpf), 61, chaos").getProtocols(), equalTo( ImmutableSet.of( IpProtocol.OSPF, IpProtocol.CHAOS, IpProtocol.ANY_HOST_INTERNAL_PROTOCOL))); }
@Test public void testConstructorInvalid() { thrown.expect(IllegalArgumentException.class); assertThat( new IpProtocolSpecifier("blah, (ospf) 89, ").getProtocols(), equalTo(ImmutableSet.of())); }