public void testCommitUserData() throws Exception {
// Verifies that committed data is retrievable
Directory dir = newDirectory();
DirectoryTaxonomyWriter ltw = new DirectoryTaxonomyWriter(dir, OpenMode.CREATE_OR_APPEND, new NoOpCache());
assertFalse(IndexReader.indexExists(dir));
ltw.commit(); // first commit, so that an index will be created
ltw.addCategory(new CategoryPath("a"));
ltw.addCategory(new CategoryPath("b"));
Map <String, String> userCommitData = new HashMap<String, String>();
userCommitData.put("testing", "1 2 3");
ltw.commit(userCommitData);