@Test
public void shouldParseServerAddressesWithoutPort() {

    addresses = MongoUtil.parseAddresses("host1,host2,[::1/128],host4");
    assertThat(addresses.size()).isEqualTo(4);
    assertThat(addresses.get(0).getHost()).isEqualTo("host1");
    assertThat(addresses.get(0).getPort()).isEqualTo(ServerAddress.defaultPort());
    assertThat(addresses.get(1).getHost()).isEqualTo("host2");
    assertThat(addresses.get(1).getPort()).isEqualTo(ServerAddress.defaultPort());
    assertThat(addresses.get(2).getHost()).isEqualTo("::1/128");
    assertThat(addresses.get(2).getPort()).isEqualTo(ServerAddress.defaultPort());
    assertThat(addresses.get(3).getHost()).isEqualTo("host4");
    assertThat(addresses.get(3).getPort()).isEqualTo(ServerAddress.defaultPort());
}