@Override
  public ExportResult<MediaContainerResource> export(UUID jobId, AD authData,
      Optional<ExportInformation> exportInfo) throws Exception {
    ExportResult<PhotosContainerResource> per = exportPhotos(jobId, authData, exportInfo);
    if (per.getThrowable().isPresent()) {
      return new ExportResult<>(per.getThrowable().get());
    }

    ExportResult<VideosContainerResource> ver = exportVideos(jobId, authData, exportInfo);
    if (ver.getThrowable().isPresent()) {
      return new ExportResult<>(ver.getThrowable().get());
    }
    return mergeResults(per, ver);
  }
@Test
  public void shouldHandleErrorInPhotos() throws Exception {
    Exception throwable = new Exception();
    mediaExporter =
        new MediaExporterDecorator<>((id, ad, ei) -> new ExportResult<>(throwable), videosExporter);

    MediaContainerResource mcr = new MediaContainerResource(albums, photos, videos);
    Optional<ExportInformation> ei = Optional.of(new ExportInformation(null, mcr));
    ExportResult<MediaContainerResource> res = mediaExporter.export(null, null, ei);
    assertEquals(new ExportResult<>(throwable), res);
  }