@Override
  public ExportResult<To> export(UUID jobId, AD authData, Optional<ExportInformation> exportInfo)
      throws Exception {
    Optional<ExportInformation> infoWithConvertedResource =
        exportInfo.map(
            (ei) ->
                ei.copyWithResource(exportInformationConverter.apply(ei.getContainerResource())));
    ExportResult<From> originalResult = exporter.export(jobId, authData, infoWithConvertedResource);
    return originalResult.copyWithExportedData(
        containerResourceConverter.apply(originalResult.getExportedData()));
  }
@Test
  public void shouldHandleConversionFromPhotoExporterToMediaExporterUsingAnyInputContainerResource()
      throws Exception {
    Exporter<AuthData, PhotosContainerResource> photosExporter =
        (jobId, authData, exportInformation) ->
            new ExportResult<>(
                ResultType.END,
                exportInformation
                    .map(ei -> (PhotosContainerResource) ei.getContainerResource())
                    .get());

    AnyToAnyExporter<AuthData, PhotosContainerResource, MediaContainerResource> mediaExporter =
        new AnyToAnyExporter<>(
            photosExporter,
            MediaContainerResource::photoToMedia,
            (cr) -> {
              assertThat(cr).isInstanceOf(DateRangeContainerResource.class);
              return new PhotosContainerResource(null, null);
            });
    ExportInformation ei = new ExportInformation(null, new DateRangeContainerResource(0, 0));

    ExportResult<MediaContainerResource> actual = mediaExporter.export(null, null, Optional.of(ei));

    MediaContainerResource expected = new MediaContainerResource(null, null, null);
    assertThat(actual.getExportedData()).isEqualTo(expected);
  }