Converter { public static int durationStringLongToMs(String input) { String[] parts = input.split(":"); if (parts.length != 3) { return 0; } return Integer.parseInt(parts[0]) * 3600 * 1000 + Integer.parseInt(parts[1]) * 60 * 1000 + Integer.parseInt(parts[2]) * 1000; } private  Converter(); static String getDurationStringLong(int duration); static String getDurationStringShort(int duration, boolean durationIsInHours); static int durationStringLongToMs(String input); static int durationStringShortToMs(String input, boolean durationIsInHours); static String getDurationStringLocalized(Context context, long duration); static String shortLocalizedDuration(Context context, long time); static float getVolumeFromPercentage(int progress);  }
@Test public void testDurationStringLongToMs() { String input = "01:20:30"; long expected = 4830000; assertEquals(expected, Converter.durationStringLongToMs(input)); }