Bump yangtools to 2.0.2
[controller.git] / opendaylight / config / yang-jmx-generator / src / test / java / org / opendaylight / controller / config / yangjmxgenerator / ServiceInterfaceEntryTest.java
index f22edbf948f0ba93b77346cc0b55786fcc032ab5..04bd7e79c84b27a26d6af683d2e268b7a1806925 100644 (file)
@@ -12,23 +12,19 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertThat;
 
 import com.google.common.collect.Sets;
-
 import java.net.URI;
 import java.net.URISyntaxException;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
 import java.util.Arrays;
-import java.util.Date;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Set;
-
 import org.hamcrest.CoreMatchers;
 import org.junit.Test;
 import org.opendaylight.yangtools.yang.common.QName;
+import org.opendaylight.yangtools.yang.common.Revision;
 import org.opendaylight.yangtools.yang.model.api.IdentitySchemaNode;
 
 public class ServiceInterfaceEntryTest extends AbstractYangTest {
@@ -39,20 +35,13 @@ public class ServiceInterfaceEntryTest extends AbstractYangTest {
             + ".java, ThreadFactoryServiceInterface.java, ThreadPoolServiceInterface.java]");
 
     private static final URI THREADS_NAMESPACE;
-    private static final Date THREADS_REVISION_DATE;
+    private static final Revision THREADS_REVISION_DATE = Revision.of("2013-04-09");
 
     static {
         try {
-            THREADS_NAMESPACE = new URI(ConfigConstants.CONFIG_NAMESPACE
-                    + ":threads");
+            THREADS_NAMESPACE = new URI(ConfigConstants.CONFIG_NAMESPACE + ":threads");
         } catch (URISyntaxException e) {
-            throw new Error(e);
-        }
-        SimpleDateFormat revisionFormat = new SimpleDateFormat("yyyy-MM-dd");
-        try {
-            THREADS_REVISION_DATE = revisionFormat.parse("2013-04-09");
-        } catch (ParseException e) {
-            throw new Error(e);
+            throw new ExceptionInInitializerError(e);
         }
     }
 
@@ -125,7 +114,7 @@ public class ServiceInterfaceEntryTest extends AbstractYangTest {
                 is(PackageTranslatorTest.EXPECTED_PACKAGE_PREFIX
                         + ".threadpool.ThreadPool"));
 
-        String expectedDescription = "An extension of the simple pool of threads able to schedule "
+        String expectedDescription = "An extension of the simple pool of threads able to schedule\n"
                 + "work to be executed at some point in time.";
         assertThat(trimInnerSpacesOrNull(scheduled.getNullableDescription()),
                 is(expectedDescription));