package cgeo.geocaching;

import junit.framework.TestCase;

public class LogTemplateProviderTest extends TestCase {

    public static void testApplyTemplates() {
        final String noTemplates = " no templates ";
        assertEquals(noTemplates, LogTemplateProvider.applyTemplates(noTemplates, true));
        assertTrue(LogTemplateProvider.applyTemplates("[DATE]", true).contains("."));
    }

}

@@ -19,16 +19,44 @@
 ching;%0A%0A
+import java.util.Calendar;%0A%0A
 import j
@@ -80,16 +80,16 @@
 stCase;%0A
-
 %0Apublic 
@@ -326,16 +326,183 @@
  true));
+%0A%0A        // This test can occasionally fail if the current year changes right after the next line.%0A        final String currentYear = Integer.toString(Calendar.YEAR);
 %0A       
@@ -577,11 +577,19 @@
 ins(
-%22.%22
+currentYear
 ));%0A

Fix text by requiring the current year to be present in output