@Test public void testInvalidDecodeTimestamp() { String[] tests = { "sd45gfgf5sd4g5ffd54g", "ě5 1g56ew1tč6516re5g1g65d1g65d", "abcegkjkjsdlkjg", "" }; for (int i = 0; i < tests.length; i++) { try { Timestamp.decodeTimeCookie(tests[i]).getTime(); Assert.fail("Decoding should throw an exception - invalid format"); } catch (Exception e) { } } }
public static Date decodeTimeCookie(String cookie) throws NumberFormatException { return new Date(Long.parseLong(cookie, 16) * 1000); }
Timestamp { public static Date decodeTimeCookie(String cookie) throws NumberFormatException { return new Date(Long.parseLong(cookie, 16) * 1000); } }
Timestamp { public static Date decodeTimeCookie(String cookie) throws NumberFormatException { return new Date(Long.parseLong(cookie, 16) * 1000); } private  Timestamp(); }
Timestamp { public static Date decodeTimeCookie(String cookie) throws NumberFormatException { return new Date(Long.parseLong(cookie, 16) * 1000); } private  Timestamp(); static Date decodeTimeCookie(String cookie); static String encodeTimeCookie(Date date); }
Timestamp { public static Date decodeTimeCookie(String cookie) throws NumberFormatException { return new Date(Long.parseLong(cookie, 16) * 1000); } private  Timestamp(); static Date decodeTimeCookie(String cookie); static String encodeTimeCookie(Date date);  }