@Test
public void shouldParseServerIPv6AddressesWithReplicaSetNameAndWithPort() {

    addresses = MongoUtil.parseAddresses("replicaSetName/[::1/128]:2111,host2:3111,[ff02::2:ff00:0/104]:4111,host4:5111");
    assertThat(addresses.size()).isEqualTo(4);
    assertThat(addresses.get(0).getHost()).isEqualTo("::1/128");
    assertThat(addresses.get(0).getPort()).isEqualTo(2111);
    assertThat(addresses.get(1).getHost()).isEqualTo("host2");
    assertThat(addresses.get(1).getPort()).isEqualTo(3111);
    assertThat(addresses.get(2).getHost()).isEqualTo("ff02::2:ff00:0/104");
    assertThat(addresses.get(2).getPort()).isEqualTo(4111);
    assertThat(addresses.get(3).getHost()).isEqualTo("host4");
    assertThat(addresses.get(3).getPort()).isEqualTo(5111);
}