code: @JsonIgnore
      public Optional<Email> getPrimaryOrFirstEmail() {
          for (Email email : emails) {
              if (email.isPrimary()) {
                  return Optional.of(email);
              }
          }
  
          if (emails.size() > 0) {
              return Optional.of(getEmails().get(0));
          }
          return Optional.absent();
      }
docs: try to extract an email from the User.
  If the User has a primary email address this email will be returned.
  If not the first email address found will be returned.
  If no Email has been found email.isPresent() == false
  
  @return an email if found