CSL implements Closeable { public void setOutputFormat(String format) { if (experimentalMode) { if ("text".equals(format)) { outputFormat = new TextFormat(); } else if ("html".equals(format)) { outputFormat = new HtmlFormat(); } else { throw new IllegalArgumentException("Experimental mode " + "only supports `text' and `html' output formats " + "at the moment."); } outputFormat.setConvertLinks(convertLinks); return; } if (!getSupportedOutputFormats(runner).contains(format)) { throw new IllegalArgumentException("Unknown output format: " + format); } try { runner.callMethod(engine, "setOutputFormat", format); outputFormatName = format; } catch (ScriptRunnerException e) { throw new IllegalArgumentException("Could not set output format", e); } } CSL(ItemDataProvider itemDataProvider, String style);  CSL(ItemDataProvider itemDataProvider, String style,
            boolean experimentalMode);  CSL(ItemDataProvider itemDataProvider, AbbreviationProvider abbreviationProvider,
            String style);  CSL(ItemDataProvider itemDataProvider, String style, String lang);  CSL(ItemDataProvider itemDataProvider, AbbreviationProvider abbreviationProvider,
            String style, String lang);  CSL(ItemDataProvider itemDataProvider, LocaleProvider localeProvider,
            String style, String lang, boolean forceLang);  CSL(ItemDataProvider itemDataProvider, LocaleProvider localeProvider,
            AbbreviationProvider abbreviationProvider, String style,
            String lang, boolean forceLang);  CSL(ItemDataProvider itemDataProvider, LocaleProvider localeProvider,
            AbbreviationProvider abbreviationProvider, VariableWrapper variableWrapper,
            String style, String lang, boolean forceLang);  CSL(ItemDataProvider itemDataProvider, LocaleProvider localeProvider,
            AbbreviationProvider abbreviationProvider, VariableWrapper variableWrapper,
            String style, String lang, boolean forceLang,
            boolean experimentalMode); static List<String> getSupportedOutputFormats(); static Set<String> getSupportedStyles(); static String getCiteprocJsVersion(); static String getJavaScriptEngineName(); static String getJavaScriptEngineVersion(); static boolean supportsStyle(String style); static Set<String> getSupportedLocales(); String getIndependentParentLink(String style); void setOutputFormat(String format); void setConvertLinks(boolean convert); void setAbbreviations(String name); void registerCitationItems(String... ids); void registerCitationItems(String[] ids, boolean unsorted); Collection<CSLItemData> getRegisteredItems(); List<Citation> makeCitation(String... ids); List<Citation> makeCitation(CSLCitation citation); List<Citation> makeCitation(CSLCitation citation,
            List<CitationIDIndexPair> citationsPre,
            List<CitationIDIndexPair> citationsPost); Bibliography makeBibliography(); Bibliography makeBibliography(SelectionMode mode, CSLItemData... selection); Bibliography makeBibliography(SelectionMode mode,
            CSLItemData[] selection, CSLItemData[] quash); Bibliography makeBibliography(Predicate<CSLItemData> filter); void reset(); static Bibliography makeAdhocBibliography(String style, CSLItemData... items); static Bibliography makeAdhocBibliography(String style, String outputFormat,
            CSLItemData... items); static Bibliography makeAdhocBibliography(String style, String outputFormat,
            boolean experimentalMode, CSLItemData... items); @Override void close(); static void removeThreadLocals();  }
@Test(expected = IllegalArgumentException.class) public void setIllegalOutputFormat() throws Exception { try (CSL citeproc = new CSL(new ListItemDataProvider(items), "ieee")) { citeproc.setOutputFormat("MY_ILLEGAL_OUTPUT_FORMAT"); } }