@Test public void shouldFailToLoadIfExporterInvalid() { final String id = "exporter"; final Class<? extends Exporter> exporterClass = InvalidExporter.class; assertThatThrownBy(() -> repository.load(id, exporterClass)) .isInstanceOf(ExporterLoadException.class) .hasCauseInstanceOf(IllegalStateException.class); }
public ExporterDescriptor load(final String id, final Class<? extends Exporter> exporterClass) throws ExporterLoadException { return load(id, exporterClass, null); }
ExporterRepository { public ExporterDescriptor load(final String id, final Class<? extends Exporter> exporterClass) throws ExporterLoadException { return load(id, exporterClass, null); } }
ExporterRepository { public ExporterDescriptor load(final String id, final Class<? extends Exporter> exporterClass) throws ExporterLoadException { return load(id, exporterClass, null); } ExporterRepository();  ExporterRepository(
      final Map<String, ExporterDescriptor> exporters, final ExporterJarRepository jarRepository); }
ExporterRepository { public ExporterDescriptor load(final String id, final Class<? extends Exporter> exporterClass) throws ExporterLoadException { return load(id, exporterClass, null); } ExporterRepository();  ExporterRepository(
      final Map<String, ExporterDescriptor> exporters, final ExporterJarRepository jarRepository); Map<String, ExporterDescriptor> getExporters(); ExporterDescriptor load(final String id, final Class<? extends Exporter> exporterClass); ExporterDescriptor load(
      final String id,
      final Class<? extends Exporter> exporterClass,
      final Map<String, Object> args); ExporterDescriptor load(final String id, final ExporterCfg config); }
ExporterRepository { public ExporterDescriptor load(final String id, final Class<? extends Exporter> exporterClass) throws ExporterLoadException { return load(id, exporterClass, null); } ExporterRepository();  ExporterRepository(
      final Map<String, ExporterDescriptor> exporters, final ExporterJarRepository jarRepository); Map<String, ExporterDescriptor> getExporters(); ExporterDescriptor load(final String id, final Class<? extends Exporter> exporterClass); ExporterDescriptor load(
      final String id,
      final Class<? extends Exporter> exporterClass,
      final Map<String, Object> args); ExporterDescriptor load(final String id, final ExporterCfg config);  }