@Test(expected = IllegalArgumentException.class) public void testGetTimeInMillisFailureCase2() { ConfigurationTypeHelper.getTimeInMillis("ms"); }
public static long getTimeInMillis(String str) { TimeUnit timeUnit; int unitsLen = 1; switch (str.charAt(str.length() - 1)) { case 'd': timeUnit = TimeUnit.DAYS; break; case 'h': timeUnit = TimeUnit.HOURS; break; case 'm': timeUnit = TimeUnit.MINUTES; break; case 's': timeUnit = TimeUnit.SECONDS; if (str.endsWith("ms")) { timeUnit = TimeUnit.MILLISECONDS; unitsLen = 2; } break; default: timeUnit = TimeUnit.SECONDS; unitsLen = 0; break; } return timeUnit.toMillis(Long.parseLong(str.substring(0, str.length() - unitsLen))); }
ConfigurationTypeHelper { public static long getTimeInMillis(String str) { TimeUnit timeUnit; int unitsLen = 1; switch (str.charAt(str.length() - 1)) { case 'd': timeUnit = TimeUnit.DAYS; break; case 'h': timeUnit = TimeUnit.HOURS; break; case 'm': timeUnit = TimeUnit.MINUTES; break; case 's': timeUnit = TimeUnit.SECONDS; if (str.endsWith("ms")) { timeUnit = TimeUnit.MILLISECONDS; unitsLen = 2; } break; default: timeUnit = TimeUnit.SECONDS; unitsLen = 0; break; } return timeUnit.toMillis(Long.parseLong(str.substring(0, str.length() - unitsLen))); } }
ConfigurationTypeHelper { public static long getTimeInMillis(String str) { TimeUnit timeUnit; int unitsLen = 1; switch (str.charAt(str.length() - 1)) { case 'd': timeUnit = TimeUnit.DAYS; break; case 'h': timeUnit = TimeUnit.HOURS; break; case 'm': timeUnit = TimeUnit.MINUTES; break; case 's': timeUnit = TimeUnit.SECONDS; if (str.endsWith("ms")) { timeUnit = TimeUnit.MILLISECONDS; unitsLen = 2; } break; default: timeUnit = TimeUnit.SECONDS; unitsLen = 0; break; } return timeUnit.toMillis(Long.parseLong(str.substring(0, str.length() - unitsLen))); }  }
ConfigurationTypeHelper { public static long getTimeInMillis(String str) { TimeUnit timeUnit; int unitsLen = 1; switch (str.charAt(str.length() - 1)) { case 'd': timeUnit = TimeUnit.DAYS; break; case 'h': timeUnit = TimeUnit.HOURS; break; case 'm': timeUnit = TimeUnit.MINUTES; break; case 's': timeUnit = TimeUnit.SECONDS; if (str.endsWith("ms")) { timeUnit = TimeUnit.MILLISECONDS; unitsLen = 2; } break; default: timeUnit = TimeUnit.SECONDS; unitsLen = 0; break; } return timeUnit.toMillis(Long.parseLong(str.substring(0, str.length() - unitsLen))); }  static long getFixedMemoryAsBytes(String str); static long getMemoryAsBytes(String str); static long getTimeInMillis(String str); static double getFraction(String str); static T getClassInstance(String context, String clazzName, Class<T> base,
      T defaultInstance); static T getClassInstance(String context, String clazzName, Class<T> base); static int getNumThreads(String threads); }
ConfigurationTypeHelper { public static long getTimeInMillis(String str) { TimeUnit timeUnit; int unitsLen = 1; switch (str.charAt(str.length() - 1)) { case 'd': timeUnit = TimeUnit.DAYS; break; case 'h': timeUnit = TimeUnit.HOURS; break; case 'm': timeUnit = TimeUnit.MINUTES; break; case 's': timeUnit = TimeUnit.SECONDS; if (str.endsWith("ms")) { timeUnit = TimeUnit.MILLISECONDS; unitsLen = 2; } break; default: timeUnit = TimeUnit.SECONDS; unitsLen = 0; break; } return timeUnit.toMillis(Long.parseLong(str.substring(0, str.length() - unitsLen))); }  static long getFixedMemoryAsBytes(String str); static long getMemoryAsBytes(String str); static long getTimeInMillis(String str); static double getFraction(String str); static T getClassInstance(String context, String clazzName, Class<T> base,
      T defaultInstance); static T getClassInstance(String context, String clazzName, Class<T> base); static int getNumThreads(String threads);  }