### Question:
CSL implements Closeable { public void reset() { if (experimentalMode) { outputFormatName = "html"; outputFormat = new HtmlFormat(); convertLinks = false; registeredItems.clear(); sortedItems.clear(); generatedCitations.clear(); } else { try { runner.callMethod(engine, "restoreProcessorState"); } catch (ScriptRunnerException e) { throw new IllegalArgumentException("Could not reset processor state", 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();  }### Answer:
@Test @Parameters({"false", "true"}) public void reset(boolean experimentalMode) throws Exception { try (CSL citeproc = new CSL(new ListItemDataProvider(items), "ieee", experimentalMode)) { citeproc.setOutputFormat("text"); List<Citation> a = citeproc.makeCitation(items[0].getId()); assertEquals(0, a.get(0).getIndex()); assertEquals("[1]", a.get(0).getText()); Bibliography b = citeproc.makeBibliography(); assertEquals(1, b.getEntries().length); citeproc.reset(); b = citeproc.makeBibliography(); assertEquals(0, b.getEntries().length); } }