Index: trunk/test/unit/org/openstreetmap/josm/data/validation/tests/UnconnectedWaysTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/validation/tests/UnconnectedWaysTest.java	(revision 8917)
+++ trunk/test/unit/org/openstreetmap/josm/data/validation/tests/UnconnectedWaysTest.java	(revision 8926)
@@ -6,4 +6,6 @@
 
 import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
 import java.io.InputStream;
 
@@ -13,12 +15,17 @@
 import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
+import org.openstreetmap.josm.io.IllegalDataException;
 import org.openstreetmap.josm.io.OsmReader;
 
+/**
+ * Unit tests of {@code UnconnectedWays} class.
+ */
 public class UnconnectedWaysTest {
 
-    UnconnectedWays bib;
+    private UnconnectedWays bib;
 
     /**
      * Setup test.
+     * @throws Exception if the test cannot be initialized
      */
     @Before
@@ -30,6 +37,12 @@
     }
 
+    /**
+     * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/6313">Bug #6313</a>.
+     * @throws IOException if any I/O error occurs
+     * @throws IllegalDataException if the OSM data cannot be parsed
+     * @throws FileNotFoundException if the data file cannot be found
+     */
     @Test
-    public void testTicket6313() throws Exception {
+    public void testTicket6313() throws IOException, IllegalDataException, FileNotFoundException {
         try (InputStream fis = new FileInputStream("data_nodist/UnconnectedWaysTest.osm")) {
             final DataSet ds = OsmReader.parseDataSet(fis, NullProgressMonitor.INSTANCE);
Index: trunk/test/unit/org/openstreetmap/josm/tools/template_engine/TemplateEngineTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/tools/template_engine/TemplateEngineTest.java	(revision 8917)
+++ trunk/test/unit/org/openstreetmap/josm/tools/template_engine/TemplateEngineTest.java	(revision 8926)
@@ -30,4 +30,8 @@
     }
 
+    /**
+     * Test to parse an empty string.
+     * @throws ParseError if the template cannot be parsed
+     */
     @Test
     public void testEmpty() throws ParseError {
@@ -36,4 +40,8 @@
     }
 
+    /**
+     * Test to parse a variable.
+     * @throws ParseError if the template cannot be parsed
+     */
     @Test
     public void testVariable() throws ParseError {
@@ -43,4 +51,8 @@
     }
 
+    /**
+     * Test to parse a condition with whitespaces.
+     * @throws ParseError if the template cannot be parsed
+     */
     @Test
     public void testConditionWhitespace() throws ParseError {
@@ -53,4 +65,8 @@
     }
 
+    /**
+     * Test to parse a condition without whitespace.
+     * @throws ParseError if the template cannot be parsed
+     */
     @Test
     public void testConditionNoWhitespace() throws ParseError {
@@ -63,10 +79,15 @@
     }
 
-    private static Match compile(String expression) throws org.openstreetmap.josm.actions.search.SearchCompiler.ParseError {
+    private static Match compile(String expression) throws SearchCompiler.ParseError {
         return SearchCompiler.compile(expression);
     }
 
-    @Test
-    public void testConditionSearchExpression() throws Exception {
+    /**
+     * Test to parse a search expression condition.
+     * @throws ParseError if the template cannot be parsed
+     * @throws SearchCompiler.ParseError if an error has been encountered while compiling
+     */
+    @Test
+    public void testConditionSearchExpression() throws ParseError, SearchCompiler.ParseError {
         TemplateParser parser = new TemplateParser("?{ admin_level = 2 'NUTS 1' | admin_level = 4 'NUTS 2' |  '{admin_level}'}");
         Condition condition = new Condition();
@@ -108,6 +129,10 @@
     };
 
-    @Test
-    public void testFilling() throws Exception {
+    /**
+     * Test to fill a template.
+     * @throws ParseError if the template cannot be parsed
+     */
+    @Test
+    public void testFilling() throws ParseError {
         TemplateParser parser = new TemplateParser("{name} u{unknown}u i{number}i");
         TemplateEntry entry = parser.parse();
@@ -117,6 +142,10 @@
     }
 
-    @Test
-    public void testFillingSearchExpression() throws Exception {
+    /**
+     * Test to parse a search expression.
+     * @throws ParseError if the template cannot be parsed
+     */
+    @Test
+    public void testFillingSearchExpression() throws ParseError {
         TemplateParser parser = new TemplateParser("?{ admin_level = 2 'NUTS 1' | admin_level = 4 'NUTS 2' |  '{admin_level}'}");
         TemplateEntry templateEntry = parser.parse();
@@ -134,6 +163,10 @@
     }
 
-    @Test
-    public void testPrintAll() throws Exception {
+    /**
+     * Test to print all.
+     * @throws ParseError if the template cannot be parsed
+     */
+    @Test
+    public void testPrintAll() throws ParseError {
         TemplateParser parser = new TemplateParser("{special:everything}");
         TemplateEntry entry = parser.parse();
@@ -143,6 +176,10 @@
     }
 
-    @Test
-    public void testPrintMultiline() throws Exception {
+    /**
+     * Test to print on several lines.
+     * @throws ParseError if the template cannot be parsed
+     */
+    @Test
+    public void testPrintMultiline() throws ParseError {
         TemplateParser parser = new TemplateParser("{name}\\n{number}");
         TemplateEntry entry = parser.parse();
@@ -152,6 +189,10 @@
     }
 
-    @Test
-    public void testSpecialVariable() throws Exception {
+    /**
+     * Test to print special variables.
+     * @throws ParseError if the template cannot be parsed
+     */
+    @Test
+    public void testSpecialVariable() throws ParseError {
         TemplateParser parser = new TemplateParser("{name}u{special:localName}u{special:special:key}");
         TemplateEntry templateEntry = parser.parse();
@@ -169,6 +210,10 @@
     }
 
-    @Test
-    public void testSwitchContext() throws Exception {
+    /**
+     * Test to switch context.
+     * @throws ParseError if the template cannot be parsed
+     */
+    @Test
+    public void testSwitchContext() throws ParseError {
         TemplateParser parser = new TemplateParser("!{parent() type=parent2 '{name}'}");
         DatasetFactory ds = new DatasetFactory();
@@ -208,5 +253,4 @@
         parent1.addMember(new RelationMember("", child2));
         parent2.addMember(new RelationMember("", child2));
-
 
         StringBuilder sb = new StringBuilder();
