added test case to TimeTest.java 45/83045/2
authorSandeep J <sandeejh@in.ibm.com>
Fri, 22 Mar 2019 13:58:24 +0000 (19:28 +0530)
committerJoss Armstrong <joss.armstrong@ericsson.com>
Fri, 22 Mar 2019 17:23:27 +0000 (17:23 +0000)
to increase code coverage

Issue-ID: APPC-1086
Change-Id: I9ed0192a67d594691f45978d2166b0992a40c656
Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
appc-core/appc-common-bundle/src/test/java/org/onap/appc/util/TimeTest.java

index 2678438..325c6eb 100644 (file)
@@ -27,6 +27,7 @@ package org.onap.appc.util;
  
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 
 import java.text.ParseException;
@@ -144,6 +145,11 @@ public class TimeTest {
         String expected = "2004-02-09 00:00:00:000";
         assertEquals(expected, dateString);
     }
+    
+    @Test
+    public void testDateToStringConverterMillisForNullDate() {
+        assertNull(Time.dateToStringConverterMillis(null));
+    }
 
     @Test
     public void testStringToDateConverterMillis() throws ParseException {