public Importer getCompatibleImporter(TransferExtension extension, DataVertical jobType) {
    Importer<?, ?> importer = getImporterOrNull(extension, jobType);
    if (importer != null) {
      return importer;
    }

    switch (jobType) {
      case MEDIA:
        importer = getMediaImporter(extension);
        break;
      case PHOTOS:
        importer = getPhotosImporter(extension);
        break;
      case VIDEOS:
        importer = getVideosImporter(extension);
        break;
    }
    if (importer == null) {
      return extension.getImporter(jobType);
    }
    return importer;
  }
@Test
  public void shouldConstructPhotoAndVideoImportersFromMedia() {
    TransferExtension ext = mock(TransferExtension.class);
    when(ext.getImporter(eq(MEDIA))).thenReturn(mock(Importer.class));

    assertThat(compatibilityProvider.getCompatibleImporter(ext, PHOTOS))
        .isInstanceOf(AnyToAnyImporter.class);
    assertThat(compatibilityProvider.getCompatibleImporter(ext, VIDEOS))
        .isInstanceOf(AnyToAnyImporter.class);
  }