@@ -0,0 +1,1606 @@
+package edu.brown.cs.systems.tracingplane.baggage_layer;%0A%0Aimport java.nio.ByteBuffer;%0Aimport org.junit.Test;%0Aimport edu.brown.cs.systems.tracingplane.atom_layer.types.Lexicographic;%0Aimport junit.framework.TestCase;%0A%0Apublic class TestBagKey extends TestCase %7B%0A    %0A    @Test%0A    public void testBagKeyComparison() %7B%0A        int%5B%5D indicesToTest = %7B Integer.MIN_VALUE, Short.MIN_VALUE, -10, -3, -1, 0, 1, 3, 10, Short.MAX_VALUE, Integer.MAX_VALUE %7D;%0A        String%5B%5D keysToTest = %7B %22%22, %22a%22, %22aaaaa%22, %22hello%22, %22hell%22, %22boo%22 %7D;%0A        ByteBuffer%5B%5D bufs = new ByteBuffer%5BkeysToTest.length%5D;%0A        for (int i = 0; i %3C keysToTest.length; i++) %7B%0A            bufs%5Bi%5D = ByteBuffer.wrap(keysToTest%5Bi%5D.getBytes());%0A        %7D%0A        %0A        for (int i : indicesToTest) %7B%0A            for (int j : indicesToTest) %7B%0A                assertEquals(Integer.compare(i, j), BagKey.indexed(i).compareTo(BagKey.indexed(j)));%0A            %7D%0A            for (String key : keysToTest) %7B%0A                assertEquals(-1, BagKey.indexed(i).compareTo(BagKey.named(key)));%0A                assertEquals(1, BagKey.named(key).compareTo(BagKey.indexed(i)));%0A            %7D%0A            for (ByteBuffer buf : bufs) %7B%0A                assertEquals(-1, BagKey.indexed(i).compareTo(BagKey.named(buf)));     %0A                assertEquals(1, BagKey.named(buf).compareTo(BagKey.indexed(i)));           %0A            %7D%0A        %7D%0A        %0A        for (ByteBuffer a : bufs) %7B%0A            for (ByteBuffer b : bufs) %7B%0A                assertEquals(Lexicographic.compare(a, b), BagKey.named(a).compareTo(BagKey.named(b)));%0A            %7D%0A        %7D%0A    %7D%0A%0A%7D%0A

Add more tests