@@ -0,0 +1,1381 @@
+package cgeo.geocaching.models;%0A%0Aimport cgeo.CGeoTestCase;%0Aimport cgeo.geocaching.enumerations.WaypointType;%0A%0Aclass WaypointTest extends CGeoTestCase %7B%0A%0A    public static void testGetDefaultWaypointName() %7B%0A        final Geocache cache = new Geocache();%0A        // all test cases check numbering across different waypoint types%0A%0A        // simplest case: number is at the end, add 1%0A        cache.addOrChangeWaypoint(new Waypoint(%22%22, null, %22Test 1%22, %22%22, %22%22, WaypointType.OWN), false);%0A        final String new1 = Waypoint.getDefaultWaypointName(cache, WaypointType.WAYPOINT);%0A        assertEquals(WaypointType.WAYPOINT.getNameForNewWaypoint() + %22 2%22, new1);%0A%0A        // a bit more tricky: number somewhere in the middle%0A        cache.addOrChangeWaypoint(new Waypoint(%22%22, null, %22Test 12 - Error?%22, %22%22, %22%22, WaypointType.OWN), false);%0A        final String new2 = Waypoint.getDefaultWaypointName(cache, WaypointType.OWN);%0A        assertEquals(WaypointType.OWN.getNameForNewWaypoint() + %22 13%22, new2);%0A%0A        // even more tricky: two numbers in the name - should find the higher one%0A        cache.addOrChangeWaypoint(new Waypoint(%22%22, null, %22Test 20 - Error 18?%22, %22%22, %22%22, WaypointType.TRAILHEAD), false);%0A        final String new3 = Waypoint.getDefaultWaypointName(cache, WaypointType.PUZZLE);%0A        assertEquals(WaypointType.PUZZLE.getNameForNewWaypoint() + %22 21%22, new3);%0A%0A    %7D%0A%0A%0A%7D%0A

add tests for getDefaultWaypointName