@@ -0,0 +1,1164 @@
+package scratchlib.objects;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertFalse;%0Aimport static org.junit.Assert.assertNull;%0Aimport static org.junit.Assert.assertSame;%0Aimport static org.junit.Assert.assertTrue;%0A%0Aimport org.junit.Test;%0A%0Aimport scratchlib.objects.fixed.collections.ScratchObjectArray;%0A%0A%0Apublic class ScratchReferenceTableTest%0A%7B%0A    @Test%0A    public void returnsNegativeOneWhenObjectNotFound()%0A    %7B%0A        ScratchReferenceTable obj = new ScratchReferenceTable();%0A%0A        assertEquals(-1, obj.lookup(new ScratchObjectArray()));%0A    %7D%0A%0A    @Test%0A    public void returnsNullWhenIDNotFound()%0A    %7B%0A        ScratchReferenceTable obj = new ScratchReferenceTable();%0A%0A        assertNull(obj.lookup(37));%0A    %7D%0A%0A    @Test%0A    public void insertsOnce()%0A    %7B%0A        ScratchReferenceTable obj = new ScratchReferenceTable();%0A%0A        assertEquals(0, obj.size());%0A%0A        ScratchObjectArray arr = new ScratchObjectArray();%0A%0A        assertTrue(obj.insert(arr));%0A        assertEquals(1, obj.size());%0A        assertSame(arr, obj.lookup(1));%0A%0A        assertFalse(obj.insert(arr));%0A        assertEquals(1, obj.size());%0A    %7D%0A%7D%0A

Add unit tests for ScratchReferenceTable