public Exporter getCompatibleExporter(TransferExtension extension, DataVertical jobType) {
    Exporter<?, ?> exporter = getExporterOrNull(extension, jobType);
    if (exporter != null) {
      return exporter;
    }

    switch (jobType) {
      case MEDIA:
        exporter = getMediaExporter(extension);
        break;
      case PHOTOS:
        exporter = getPhotosExporter(extension);
        break;
      case VIDEOS:
        exporter = getVideosExporter(extension);
        break;
    }
    if (exporter == null) {
      return extension.getExporter(jobType); // preserve original exception
    }
    return exporter;
  }
@Test
  public void shouldConstructPhotoAndVideoExportersFromMedia() {
    TransferExtension ext = mock(TransferExtension.class);
    when(ext.getExporter(eq(MEDIA))).thenReturn(mock(Exporter.class));

    assertThat(compatibilityProvider.getCompatibleExporter(ext, PHOTOS))
        .isInstanceOf(AnyToAnyExporter.class);
    assertThat(compatibilityProvider.getCompatibleExporter(ext, VIDEOS))
        .isInstanceOf(AnyToAnyExporter.class);
  }