Index: trunk/test/tmcsim/cadsimulator/CoordinatorTest.java
===================================================================
--- trunk/test/tmcsim/cadsimulator/CoordinatorTest.java	(revision 465)
+++ trunk/test/tmcsim/cadsimulator/CoordinatorTest.java	(revision 465)
@@ -0,0 +1,58 @@
+
+package tmcsim.cadsimulator;
+
+import java.rmi.RemoteException;
+import java.util.List;
+import java.util.Vector;
+import junit.framework.TestCase;
+import tmcsim.client.cadclientgui.data.Incident;
+
+/**
+ *
+ * @author jdalbey
+ */
+public class CoordinatorTest extends TestCase {
+    
+    public CoordinatorTest(String testName) {
+        super(testName);
+    }
+    
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+    }
+    
+    @Override
+    protected void tearDown() throws Exception {
+        super.tearDown();
+    }
+    
+    public void testWriteToCADLog() throws RemoteException
+    {
+        System.out.println("write to CAD log");
+        Coordinator coord = new Coordinator(null,"","");
+        Vector<Incident> incList = new Vector<Incident>();
+        Incident inci1 = new Incident(201, "Alpha", 10L);
+        Incident inci2 = new Incident(209, "Beta", 20L);
+        Incident inci3 = new Incident(205, "Charly", 20L);
+        Incident inci4 = new Incident(201, "Delta", 20L);
+        String[] fields1 = {"date","01:01:01","JHD","?","two"};
+        String[] fields2 = {"date","00:01:01","JHD","?","one"};
+        String[] fields3 = {"date","10:01:01","JHD","?","four"};
+        String[] fields4 = {"date","03:01:01","JHD","?","three"};
+        inci1.addToCommentsNotesTable(fields1);
+        inci2.addToCommentsNotesTable(fields2);
+        inci3.addToCommentsNotesTable(fields3);
+        inci4.addToCommentsNotesTable(fields4);
+        incList.add(inci1);
+        incList.add(inci2);
+        incList.add(inci3);
+        incList.add(inci4);
+        List<String> result = coord.getSortedComments(incList);
+        assertTrue(result != null);
+        assert (result.get(0).startsWith("00"));
+        assert (result.get(1).startsWith("01"));
+        assert (result.get(2).startsWith("03"));
+        assert (result.get(3).startsWith("10"));
+    }    
+}
