code: private List<ServerAddress> convertToServerAddresses(Set<String> addresses)  {
          return addresses.stream()
                          .map(this::stringToServerAddress)
                          .filter(Objects::nonNull)
                          .collect(Collectors.toList());
      }
docs: Converts list of addresses specified in text format to mongodb specific address.
  
  @param addresses list of addresses in text format
  @return list of mongodb addresses
  @throws IllegalArgumentException if address has bad format or is not valid