@Test public void hostIpv6AddressMisplacedColons() throws Exception {

  assertEquals(null, HttpUrl.parse("http://[:0000:0000:0000:0000:0000:0000:0000:0001]"));
  assertEquals(null, HttpUrl.parse("http://[:::0000:0000:0000:0000:0000:0000:0000:0001]"));
  assertEquals(null, HttpUrl.parse("http://[:1]"));
  assertEquals(null, HttpUrl.parse("http://[:::1]"));
  assertEquals(null, HttpUrl.parse("http://[0000:0000:0000:0000:0000:0000:0001:]"));
  assertEquals(null, HttpUrl.parse("http://[0000:0000:0000:0000:0000:0000:0000:0001:]"));
  assertEquals(null, HttpUrl.parse("http://[0000:0000:0000:0000:0000:0000:0000:0001::]"));
  assertEquals(null, HttpUrl.parse("http://[0000:0000:0000:0000:0000:0000:0000:0001:::]"));
  assertEquals(null, HttpUrl.parse("http://[1:]"));
  assertEquals(null, HttpUrl.parse("http://[1:::]"));
  assertEquals(null, HttpUrl.parse("http://[1:::1]"));
  assertEquals(null, HttpUrl.parse("http://[00000:0000:0000:0000::0000:0000:0000:0001]"));
}