X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fconfig%2Fyang-jmx-generator%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Fyangjmxgenerator%2FServiceInterfaceEntryTest.java;h=04bd7e79c84b27a26d6af683d2e268b7a1806925;hp=f22edbf948f0ba93b77346cc0b55786fcc032ab5;hb=f43b01b81319959b1907e3e04537f5169e7f33d8;hpb=ab935690fe544f82095c57f998fc9c0fd03c0a51 diff --git a/opendaylight/config/yang-jmx-generator/src/test/java/org/opendaylight/controller/config/yangjmxgenerator/ServiceInterfaceEntryTest.java b/opendaylight/config/yang-jmx-generator/src/test/java/org/opendaylight/controller/config/yangjmxgenerator/ServiceInterfaceEntryTest.java index f22edbf948..04bd7e79c8 100644 --- a/opendaylight/config/yang-jmx-generator/src/test/java/org/opendaylight/controller/config/yangjmxgenerator/ServiceInterfaceEntryTest.java +++ b/opendaylight/config/yang-jmx-generator/src/test/java/org/opendaylight/controller/config/yangjmxgenerator/ServiceInterfaceEntryTest.java @@ -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));