SensitivityAnalysisResultExporters { public static SensitivityAnalysisResultExporter getExporter(String format) { Objects.requireNonNull(format); for (SensitivityAnalysisResultExporter e : ServiceLoader.load(SensitivityAnalysisResultExporter.class)) { if (format.equals(e.getFormat())) { return e; } } return null; } private  SensitivityAnalysisResultExporters(); static Collection<String> getFormats(); static SensitivityAnalysisResultExporter getExporter(String format); static void export(SensitivityAnalysisResult result, Path path, String format); static void export(SensitivityAnalysisResult result, Writer writer, String format);  }
@Test public void testGetExporter() { assertEquals("CSV", SensitivityAnalysisResultExporters.getExporter("CSV").getFormat()); assertEquals("JSON", SensitivityAnalysisResultExporters.getExporter("JSON").getFormat()); }
@Test public void testExporterForUnavailableFormat() { SensitivityAnalysisResultExporter exporter = SensitivityAnalysisResultExporters.getExporter("Invalid"); assertNull(exporter); }