class CombinedMaster implements AbstractMaster<D> {

  @Override
  public final List<UniqueId> replaceVersion(final UniqueId uniqueId, final List<D> replacementDocuments) {
    final String scheme = uniqueId.getScheme();
    final M master = getMasterByScheme(scheme);
    if (master != null) {
      return master.replaceVersion(uniqueId, replacementDocuments);
    }
    return (new Try<List<UniqueId>>() {
      @Override
      public List<UniqueId> tryMaster(final M master) {
        return master.replaceVersion(uniqueId, replacementDocuments);
      }
    }).each(scheme);
  }

  protected  CombinedMaster(List<M> masterList);

}