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 shouldMaintainOriginalException() {
    TransferExtension ext = mock(TransferExtension.class);
    when(ext.getExporter(eq(MEDIA))).thenThrow(new RuntimeException());
    assertThrows(Exception.class, () -> compatibilityProvider.getCompatibleExporter(ext, MEDIA));
  }