@Test
public void preserveOrder() throws Exception {

    BibTeXDatabase db = loadUnixDatabase();
    BibTeXConverter conv = new BibTeXConverter();
    Map<String, CSLItemData> cids = conv.toItemData(db);
    Iterator<Key> ik1 = db.getEntries().keySet().iterator();
    Iterator<String> ik2 = cids.keySet().iterator();
    while (ik1.hasNext() && ik2.hasNext()) {
        assertEquals(ik1.next().getValue(), ik2.next());
    }
    assertFalse(ik1.hasNext());
    assertFalse(ik2.hasNext());
}