class AddressesArrayToMailAddressListConverter {

    public static List<MailAddress> getAddressesAsMailAddress(Address[] addresses) {
        if (addresses == null) {
            return ImmutableList.of();
        }
        return Arrays.asList(addresses)
            .stream()
            .map(address -> toMailAddress(address))
            .flatMap(Optional::stream)
            .collect(Guavate.toImmutableList());
    }

}