@Override
  public ExportResult<VideosContainerResource> export(
      UUID jobId, TokensAndUrlAuthData authData, Optional<ExportInformation> exportInformation)
      throws CopyExceptionWithFailureReason {
    Preconditions.checkNotNull(authData);

    KoofrClient koofrClient = koofrClientFactory.create(authData);
    KoofrMediaExport export = new KoofrMediaExport(koofrClient, monitor);

    try {
      export.export();

      List<VideoAlbum> exportAlbums = export.getVideoAlbums();
      List<VideoModel> exportVideos = export.getVideos();

      VideosContainerResource containerResource =
          new VideosContainerResource(exportAlbums, exportVideos);

      return new ExportResult<>(ExportResult.ResultType.END, containerResource, null);
    } catch (IOException e) {
      return new ExportResult<>(e);
    }
  }
@Test
  public void testExport() throws Exception {
    when(client.getRootPath()).thenReturn("/Data transfer");
    when(client.listRecursive("/Data transfer")).thenReturn(Fixtures.listRecursiveItems);
    when(client.fileLink("/Data transfer/Album 2 :heart:/Video 1.mp4"))
        .thenReturn("https://app-1.koofr.net/content/files/get/Video+1.mp4?base=TESTBASE");
    when(client.fileLink("/Data transfer/Videos/Video 2.mp4"))
        .thenReturn("https://app-1.koofr.net/content/files/get/Video+2.mp4?base=TESTBASE");

    UUID jobId = UUID.randomUUID();

    ExportResult<VideosContainerResource> result =
        exporter.export(jobId, authData, Optional.empty());

    assertEquals(ExportResult.ResultType.END, result.getType());
    assertNull(result.getContinuationData());
    VideosContainerResource exportedData = result.getExportedData();

    List<VideoAlbum> expectedAlbums =
        ImmutableList.of(
            new VideoAlbum("/Album 2 :heart:", "Album 2 ❤️", "Album 2 description ❤️"),
            new VideoAlbum("/Videos", "Videos", null));
    assertEquals(expectedAlbums, exportedData.getAlbums());

    List<VideoModel> expectedVideos =
        ImmutableList.of(
            new VideoModel(
                "Video 1.mp4",
                "https://app-1.koofr.net/content/files/get/Video+1.mp4?base=TESTBASE",
                null,
                "video/mp4",
                "/Album 2 :heart:/Video 1.mp4",
                "/Album 2 :heart:",
                false,
                Date.from(Instant.parse("2020-09-04T12:40:57.741Z"))),
            new VideoModel(
                "Video 2.mp4",
                "https://app-1.koofr.net/content/files/get/Video+2.mp4?base=TESTBASE",
                "Video 3 description",
                "video/mp4",
                "/Videos/Video 2.mp4",
                "/Videos",
                false,
                Date.from(Instant.parse("2020-09-04T12:41:06.949Z"))));
    assertEquals(expectedVideos, exportedData.getVideos());
  }