### Question:
Ipv4Range extends AbstractIpRange<Ipv4, Ipv4Range> { public static Ipv4RangeBuilder from(Ipv4 from) { return new Ipv4RangeBuilder(from); } protected  Ipv4Range(Ipv4 start, Ipv4 end); static Ipv4RangeBuilder from(Ipv4 from); static Ipv4RangeBuilder from(BigInteger from); static Ipv4RangeBuilder from(Long from); static Ipv4RangeBuilder from(String from); static Ipv4Range parse(String range); static Ipv4Range parseCidr(String cidrString); static Ipv4Range parseDecimalNotation(String range); @Override Long size();  }### Answer:
@Test public void shouldParseWithPrefix() { assertEquals(Ipv4Range.from(FIRST_IPV4_ADDRESS).to(LAST_IPV4_ADDRESS), Ipv4Range.from("0.0.0.0").andPrefixLength("0")); }
@Test(expected = IllegalArgumentException.class) public void shouldFailToParseWithPrefixWhenIllegalPrefix() { Ipv4Range.from("0.0.0.10").andPrefixLength("33"); }
@Test(expected = IllegalArgumentException.class) public void shouldFailToParseWithPrefixWhenPrefixIsNull() { Ipv4Range.from("0.0.0.1").andPrefixLength(null); }
@Test public void testToStringSpecialFoundInvalidCase() { assertFalse("94.126.33.0/23".equals(Ipv4Range.from(1585324288L).to(1585324799L).toString())); }
@Test public void testBuilderWithLongs() { Ipv4Range range = Ipv4Range.from(1l).to(3l); assertEquals(ip1, range.start()); assertEquals(ip3, range.end()); }
@Test public void testBuilderWithStrings() { Ipv4Range range = Ipv4Range.from("0.0.0.1").to("0.0.0.3"); assertEquals(ip1, range.start()); assertEquals(ip3, range.end()); }
@Test public void testBuilderWithIpv4s() { Ipv4Range range = Ipv4Range.from(ip1).to(ip3); assertEquals(ip1, range.start()); assertEquals(ip3, range.end()); }
@Test(expected = IllegalArgumentException.class) public void testBuilderWithInvalidRange() { Ipv4Range.from(ip3).to(ip1); }
@Test(expected = IllegalArgumentException.class) public void testBuilderWithNullStart() { Ipv4Range.from((Ipv4) null).to(ip3); }
@Test(expected = IllegalArgumentException.class) public void testBuilderWithNullEnd() { Ipv4Range.from(ip1).to((Ipv4) null); }
@Test public void testBuilderWithValidAddressAndPrefixLength() { Ipv4Range range = Ipv4Range.from("0.0.0.2").andPrefixLength(31); assertEquals(Ipv4.of("0.0.0.2"), range.start()); assertEquals(Ipv4.of("0.0.0.3"), range.end()); }
@Test(expected = IllegalArgumentException.class) public void testBuilderWithInvalidAddressAndLength() { Ipv4Range.from("0.0.0.3").andPrefixLength(31); }
@Test(expected = IllegalArgumentException.class) public void testBuilderWithTooSmallPrefixLength() { Ipv4Range.from("0.0.0.2").andPrefixLength(-1); }
@Test(expected = IllegalArgumentException.class) public void testBuilderWithTooBigPrefixLength() { Ipv4Range.from("0.0.0.2").andPrefixLength(33); }