@@ -0,0 +1,1803 @@
+package whelk.export.servlet;%0A%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0Aimport whelk.Document;%0Aimport whelk.Whelk;%0Aimport whelk.triples.JsonldSerializer;%0A%0Aimport java.util.List;%0Aimport java.util.Set;%0A%0Apublic class Other %7B%0A    /**%0A     * These tests have nothing to do with OAIPMH. Rather they are here because this test suite is the only one that%0A     * combines requiring example data, and being able to do white box code testing (test code internals).%0A     */%0A%0A    /**%0A     * This test case dissolves a record into triples, and then reassembles the tripples. The reassembled version%0A     * must equal the original version.%0A     */%0A    /* This testcase unfortunately breaks due to repeatableTerms/forcedSetTerms inconsistencies. Reactivate once fixed!%0A    @Test%0A    public void testTripleDissolutionReassembly() throws Exception%0A    %7B%0A        Whelk whelk = Whelk.createLoadedCoreWhelk();%0A        Set%3CString%3E repeatableTerms = whelk.getJsonld().getRepeatableTerms();%0A%0A        Document originalDocument = whelk.getStorage().load(%22s93qhl340tcvtcp%22); // Alice in Wonderland and Through the looking-glass%0A%0A        List%3CString%5B%5D%3E triples = new JsonldSerializer().deserialize(originalDocument.data);%0A%0A        Document reassembledDocument = new Document(JsonldSerializer.serialize(triples, repeatableTerms));%0A        JsonldSerializer.normalize(reassembledDocument.data, reassembledDocument.getCompleteId(), false);%0A        JsonldSerializer.normalize(reassembledDocument.data, reassembledDocument.getCompleteId(), false);%0A%0A        //System.out.println(%22original:%5Cn%22 + originalDocument.getDataAsString());%0A        //System.out.println(%22reassembly:%5Cn%22 + reassembledDocument.getDataAsString());%0A%0A        Assert.assertEquals(reassembledDocument.getChecksum(), originalDocument.getChecksum());%0A    %7D%0A    */%0A%7D%0A

Add triple-reassembly testcase. Unfortunately it won't pass at the moment, because the 'repeatableterms' logic isn't completely consistent.