X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=netconf%2Fmdsal-netconf-notification%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fnetconf%2Fmdsal%2Fnotification%2Fimpl%2FNetconfNotificationManagerTest.java;h=ba7e270c3561ab058a4621a35dd643f2ddf72c41;hb=efe35f12ce37107c814a5d8bb245e5f9ed9ba073;hp=a554c0d7f6ba53d46f6e5ac43973cca4fff02fc8;hpb=ff42507fbd28c52ce9a680cf04567b45008cef92;p=netconf.git diff --git a/netconf/mdsal-netconf-notification/src/test/java/org/opendaylight/netconf/mdsal/notification/impl/NetconfNotificationManagerTest.java b/netconf/mdsal-netconf-notification/src/test/java/org/opendaylight/netconf/mdsal/notification/impl/NetconfNotificationManagerTest.java index a554c0d7f6..ba7e270c35 100644 --- a/netconf/mdsal-netconf-notification/src/test/java/org/opendaylight/netconf/mdsal/notification/impl/NetconfNotificationManagerTest.java +++ b/netconf/mdsal-netconf-notification/src/test/java/org/opendaylight/netconf/mdsal/notification/impl/NetconfNotificationManagerTest.java @@ -88,21 +88,21 @@ public class NetconfNotificationManagerTest { "2015-10-23T23:59:60.20001Z", "1985-04-12T23:59:60.52Z" )) { - final Date apply = NotificationMessage.RFC3339_DATE_PARSER.apply(time); - final Date parse = new SimpleDateFormat(RFC3339_DATE_FORMAT_WITH_MILLIS_BLUEPRINT).parse(iterator.next()); - assertEquals(parse.getTime(), apply.getTime()); + final var apply = NotificationMessage.RFC3339_DATE_PARSER.apply(time); + final var parse = new SimpleDateFormat(RFC3339_DATE_FORMAT_WITH_MILLIS_BLUEPRINT).parse(iterator.next()); + assertEquals(parse, Date.from(apply)); // Testing that we're consistent from formatting to parsing. final String dateString = NotificationMessage.RFC3339_DATE_FORMATTER.apply(apply); - final Date date1 = NotificationMessage.RFC3339_DATE_PARSER.apply(dateString); + final var date1 = NotificationMessage.RFC3339_DATE_PARSER.apply(dateString); final String dateString1 = NotificationMessage.RFC3339_DATE_FORMATTER.apply(date1); assertEquals(apply, date1); assertEquals(dateString, dateString1); } // Testing that we're consistent from formatting to parsing. - final Date date0 = Date.from(Instant.ofEpochMilli(0)); + final var date0 = Instant.ofEpochMilli(0); final String dateString0 = NotificationMessage.RFC3339_DATE_FORMATTER.apply(date0); - final Date date1 = NotificationMessage.RFC3339_DATE_PARSER.apply(dateString0); + final var date1 = NotificationMessage.RFC3339_DATE_PARSER.apply(dateString0); final String dateString1 = NotificationMessage.RFC3339_DATE_FORMATTER.apply(date1); assertEquals(date0, date1); assertEquals(dateString0, dateString1);