@@ -0,0 +1,1496 @@
+package org.intermine.api.tracker;%0A%0A/*%0A * Copyright (C) 2002-2011 FlyMine%0A *%0A * This code may be freely distributed and modified under the%0A * terms of the GNU Lesser General Public Licence.  This should%0A * be distributed with the code.  See the LICENSE file for more%0A * information or http://www.gnu.org/copyleft/lesser.html.%0A *%0A */%0A%0Aimport junit.framework.TestCase;%0A%0A/**%0A * test the TemplateTrack class%0A * @author dbutano%0A *%0A */%0Apublic class TemplateTrackTest extends TestCase%0A%7B%0A%0A    public void testValidate() %7B%0A        TemplateTrack tt1 = new TemplateTrack(%22templateName%22, %22username%22, %22sessionIdentifier%22);%0A        assertEquals(%22templateName%22, tt1.getTemplateName());%0A        assertEquals(%22username%22, tt1.getUserName());%0A        assertEquals(%22sessionIdentifier%22, tt1.getSessionIdentifier());%0A        assertEquals(0, tt1.getTimestamp());%0A%0A        long currenTime = System.currentTimeMillis();%0A        TemplateTrack tt2 = new TemplateTrack(%22name%22, %22username%22, %22sessionIdentifier%22, currenTime);%0A        assertEquals(currenTime, tt2.getTimestamp());%0A%0A        assertEquals(true, new TemplateTrack(%22templateName%22, %22username%22, %22sessionIdentifier%22)%0A                                            .validate());%0A        assertEquals(false, new TemplateTrack(%22%22, %22username%22, %22sessionIdentifier%22).validate());%0A        assertEquals(true, new TemplateTrack(%22templateName%22, %22%22, %22sessionIdentifier%22).validate());%0A        assertEquals(false, new TemplateTrack(%22templateName%22, %22username%22, %22%22).validate());%0A    %7D%0A%7D%0A

Test class for TemplateTrack