@Test public void testConvertDateToStringToLongAndBackToDate() throws Exception { LOGGER.info("convert date to string to long and back to date"); String stringValue = DateConverterHelper.convertToString(ASSERT_DATE); long longValue = DateConverterHelper.convertToLong(stringValue); Date resultDate = DateConverterHelper.convertToDate(longValue); Assert.assertEquals("Result is not as expected.", ASSERT_DATE, resultDate); }
@Test public void testConvertToString() throws Exception { LOGGER.info("convert long value to date string"); String value = DateConverterHelper.convertToString(ASSERT_DATE_LONG); Assert.assertEquals("Result is not as expected.", ASSERT_DATE_STRING, value); }