test_class.file: OpenADRServerVTNCommon/src/test/java/com/avob/openadr/server/common/vtn/utils/DateUtilsTest.java
test_class.identifier: DateUtilsTest
test_case.body: @Test
      public void test() throws UnparsableDateFormatException {
          assertEquals(new Long(1483228800000L), DateUtils.parseDateAsTimestamp("2017-01-01"));
          assertEquals(new Long(1483228800000L), DateUtils.parseDateAsTimestamp("2017-01-01 00:00"));
          assertEquals(new Long(1483228800000L), DateUtils.parseDateAsTimestamp("01/01/2017"));
          assertEquals(new Long(1483228800000L), DateUtils.parseDateAsTimestamp("01/01/2017 00:00"));
          assertEquals(new Long(1483228800000L), DateUtils.parseDateAsTimestamp("1483228800000"));
  
          boolean exception = false;
          try {
              assertEquals(new Long(1483228800000L), DateUtils.parseDateAsTimestamp("mouaiccool"));
          } catch (UnparsableDateFormatException e) {
              exception = true;
          }
          assertTrue(exception);
  
          exception = false;
          try {
              assertEquals(new Long(1483228800000L), DateUtils.parseDateAsTimestamp(""));
          } catch (UnparsableDateFormatException e) {
              exception = true;
          }
          assertTrue(exception);
  
          exception = false;
          try {
              assertEquals(new Long(1483228800000L), DateUtils.parseDateAsTimestamp(null));
          } catch (UnparsableDateFormatException e) {
              exception = true;
          }
          assertTrue(exception);
      }
test_case.class_method_signature: DateUtilsTest.test()
test_case.full_signature: @Test public void test()
test_case.identifier: test
test_case.invocations: assertEquals parseDateAsTimestamp assertEquals parseDateAsTimestamp assertEquals parseDateAsTimestamp assertEquals parseDateAsTimestamp assertEquals parseDateAsTimestamp assertEquals parseDateAsTimestamp assertTrue assertEquals parseDateAsTimestamp assertTrue assertEquals parseDateAsTimestamp assertTrue
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void test()
focal_class.declarator: formats = Lists.newArrayList()
focal_class.modifier: private static final
focal_class.original_string: private static final List<SimpleDateFormat> formats = Lists.newArrayList();
focal_class.type: List<SimpleDateFormat>
focal_class.var_name: formats
focal_class.file: OpenADRServerVTNCommon/src/main/java/com/avob/openadr/server/common/vtn/utils/DateUtils.java
focal_class.identifier: DateUtils
focal_class.class_method_signature: DateUtils.DateUtils()
focal_class.full_signature: private  DateUtils()
focal_class.identifier: DateUtils
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  DateUtils()
focal_class.class_method_signature: DateUtils.parseDateAsTimestamp(String date)
focal_class.full_signature: public static Long parseDateAsTimestamp(String date)
focal_class.identifier: parseDateAsTimestamp
focal_class.modifiers: public static
focal_class.parameters: (String date)
focal_class.return: Long
focal_class.signature: Long parseDateAsTimestamp(String date)
focal_method.body: public static Long parseDateAsTimestamp(String date) throws UnparsableDateFormatException {
          if (date != null) {
              try {
                  return Long.valueOf(date);
              } catch (NumberFormatException e) {
                  for (SimpleDateFormat f : formats) {
                      try {
                          Date d = f.parse(date);
                          return d.getTime();
                      } catch (ParseException ex) {
                      }
  
                  }
              }
          }
          throw new UnparsableDateFormatException();
  
      }
focal_method.class_method_signature: DateUtils.parseDateAsTimestamp(String date)
focal_method.full_signature: public static Long parseDateAsTimestamp(String date)
focal_method.identifier: parseDateAsTimestamp
focal_method.invocations: valueOf parse getTime
focal_method.modifiers: public static
focal_method.parameters: (String date)
focal_method.return: Long
focal_method.signature: Long parseDateAsTimestamp(String date)