@Test
public void testConvertToTime() throws ParseException {

  final Object[][] testParameters = new Object[][] {{"1µs", 1L}, {"1.1µs", 1L},
      {"1microseconds", 1L}, {"1ms", 1000L}, {"1.1ms", 1100L}, {"1milliseconds", 1000L},
      {"1.1s", 1100000L}, {"1s", 1000000L}, {"1sec", 1000000L}, {"1seconds", 1000000L},
      {"1m", 60000000L}, {"1.1m", 66000000L}, {"1min", 60000000L},
      {"1minutes", 60000000L}, {"1h", 3600000000L}, {"1.1h", 3960000000L},
      {"1hr", 3600000000L}, {"1hours", 3600000000L}};
  try {
    ParsingUtils.convertToTime("Not");
  } catch (ParseException e) {
    assertEquals("Not", e.getMessage());
    assertEquals(0, e.getErrorOffset());
  }
  for (final Object[] testParameter : testParameters) {
    long expected = (Long) testParameter[1];
    String val = (String) testParameter[0];
    assertEquals(expected, ParsingUtils.convertToTime(val));
  }
}