code: public void setPhoto(Photo photo) {
          PhotoType type = photo.getType();
          if (postType != null && !postType.equals(type)) {
              throw new IllegalArgumentException("Photos must all be the same type (source or data)");
          } else if (postType == PhotoType.SOURCE && pendingPhotos.size() > 0) {
              throw new IllegalArgumentException("Only one source URL can be provided");
          }
          pendingPhotos = new ArrayList<Photo>();
          pendingPhotos.add(photo);
          this.postType = type;
      }
docs: Set the photo for this post
  @param photo the photo to add