<commit_before>package org.concord.otrunk.test2;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.URL;
import java.util.logging.Logger;

import junit.framework.TestCase;

import org.concord.framework.otrunk.OTID;
import org.concord.framework.otrunk.OTObject;
import org.concord.framework.otrunk.OTObjectService;
import org.concord.framework.otrunk.OTUser;
import org.concord.otrunk.OTObjectServiceImpl;
import org.concord.otrunk.OTrunkImpl;
import org.concord.otrunk.OTrunkUtil;
import org.concord.otrunk.datamodel.OTDatabase;
import org.concord.otrunk.datamodel.OTIDFactory;
import org.concord.otrunk.datamodel.OTTransientMapID;
import org.concord.otrunk.overlay.CompositeDatabase;
import org.concord.otrunk.overlay.OTOverlay;
import org.concord.otrunk.overlay.OverlayImpl;
import org.concord.otrunk.view.OTConfig;
import org.concord.otrunk.view.OTViewerHelper;
import org.concord.otrunk.xml.XMLDatabase;

public class OverlayObjectCopyTest extends TestCase
{
	private static final Logger logger = Logger.getLogger(OverlayObjectCopyTest.class.getCanonicalName());
	private static URL authoredContent = OverlayObjectCopyTest.class.getResource("/overlay-copy-test-authored.otml");
	private static URL learnerContent = OverlayObjectCopyTest.class.getResource("/overlay-copy-test-learner.otml");
	private OTViewerHelper viewerHelper;
	private OTDatabase mainDb;
	private OTDatabase learnerDb;
	private OTrunkImpl otrunk;
	private OTObjectServiceImpl overlayObjService;
	private OTDatabase overlayDb;
	private String documentUUID = "9d4f759c-3166-4c54-a6ab-416e546d9f62";
	
	/*
	 * Ways to embed objects and tests for them
	 *  - object with primitive attributes (int, float, String, ...)
	 *    - none changed                            [testSimpleCopyNoChange]
	 *    - one changed
	 *    - some changed                            [testSimpleCopySomeChange]
	 *    - all changed                             [testSimpleCopyAllChange]
	 *  - object with blob attribute
	 *    - none changed                            [testBlobNoChange]
	 *    - some changed                            [testBlobSomeChange]
	 *    - added                                   [testBlobAddChange]
	 *    - deleted                                 [testBlobDeleteChange]
	 *  - object with resource map
	 *    - no changes                              [testResourceMapNoChange]
	 *    - value changes 
	 *      - one value changed
	 *      - some values changed
	 *      - all values changed                    [testResourceMapValueChange]
	 *    - key/value removed
	 *      - one value removed                     [testResourceMapDeleteChange]
	 *      - some values removed
	 *      - all values removed
	 *    - key/value added
	 *      - one value added                       [testResourceMapAddChange]
	 *      - some values added
	 *  - object with resource list<commit_msg>Extra documentation in the comments to describe what the info means.<commit_after>package org.concord.otrunk.test2;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.URL;
import java.util.logging.Logger;

import junit.framework.TestCase;

import org.concord.framework.otrunk.OTID;
import org.concord.framework.otrunk.OTObject;
import org.concord.framework.otrunk.OTObjectService;
import org.concord.framework.otrunk.OTUser;
import org.concord.otrunk.OTObjectServiceImpl;
import org.concord.otrunk.OTrunkImpl;
import org.concord.otrunk.OTrunkUtil;
import org.concord.otrunk.datamodel.OTDatabase;
import org.concord.otrunk.datamodel.OTIDFactory;
import org.concord.otrunk.datamodel.OTTransientMapID;
import org.concord.otrunk.overlay.CompositeDatabase;
import org.concord.otrunk.overlay.OTOverlay;
import org.concord.otrunk.overlay.OverlayImpl;
import org.concord.otrunk.view.OTConfig;
import org.concord.otrunk.view.OTViewerHelper;
import org.concord.otrunk.xml.XMLDatabase;

public class OverlayObjectCopyTest extends TestCase
{
	private static final Logger logger = Logger.getLogger(OverlayObjectCopyTest.class.getCanonicalName());
	private static URL authoredContent = OverlayObjectCopyTest.class.getResource("/overlay-copy-test-authored.otml");
	private static URL learnerContent = OverlayObjectCopyTest.class.getResource("/overlay-copy-test-learner.otml");
	private OTViewerHelper viewerHelper;
	private OTDatabase mainDb;
	private OTDatabase learnerDb;
	private OTrunkImpl otrunk;
	private OTObjectServiceImpl overlayObjService;
	private OTDatabase overlayDb;
	private String documentUUID = "9d4f759c-3166-4c54-a6ab-416e546d9f62";
	
	/*
	 * Ways to embed objects and tests for them
	 * (- test description                          [testMethodName] )
	 * 
	 *  - object with primitive attributes (int, float, String, ...)
	 *    - none changed                            [testSimpleCopyNoChange]
	 *    - one changed
	 *    - some changed                            [testSimpleCopySomeChange]
	 *    - all changed                             [testSimpleCopyAllChange]
	 *  - object with blob attribute
	 *    - none changed                            [testBlobNoChange]
	 *    - some changed                            [testBlobSomeChange]
	 *    - added                                   [testBlobAddChange]
	 *    - deleted                                 [testBlobDeleteChange]
	 *  - object with resource map
	 *    - no changes                              [testResourceMapNoChange]
	 *    - value changes 
	 *      - one value changed
	 *      - some values changed
	 *      - all values changed                    [testResourceMapValueChange]
	 *    - key/value removed
	 *      - one value removed                     [testResourceMapDeleteChange]
	 *      - some values removed
	 *      - all values removed
	 *    - key/value added
	 *      - one value added                       [testResourceMapAddChange]
	 *      - some values added
	 *  - object with resource list
{'fraction_non_alphanumeric': 0.08029441284710606, 'fraction_numerical': 0.007694881231180997, 'mean_word_length': 2.641291108404385, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6743670', 'n_tokens_mistral': 1775, 'n_tokens_neox': 1679, 'n_words': 358}