### Question:
Ipv4Range extends AbstractIpRange<Ipv4, Ipv4Range> { public static Ipv4Range parse(String range) { int idx = range.indexOf(DASH); if (idx != -1) { Ipv4 start = Ipv4.parse(range.substring(0, idx)); Ipv4 end = Ipv4.parse(range.substring(idx + 1, range.length())); return new Ipv4Range(start, end); } else { return parseCidr(range); } } 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 shouldParseDashNotationWhenEmptyRange() { assertEquals(Ipv4.parse("192.168.0.1").asRange(), Ipv4Range.parse("192.168.0.1-192.168.0.1")); }
@Test(expected = IllegalArgumentException.class) public void shouldFailToParseDashNotationWhenIllegalRange() { Ipv4Range.parse("0.0.0.10-0.0.0.1"); }
@Test(expected = IllegalArgumentException.class) public void shouldFailToParseDashNotationWhenSingleResource() { Ipv4Range.parse("0.0.0.1"); }
@Test(expected = IllegalArgumentException.class) public void shouldFailToParseCidrWhenIllegalPrefixTwo() { Ipv4Range.parse("5.57.249.88/28"); }