TimeMathParser { @SuppressWarnings("WeakerAccess") public static long parseTimeInSeconds(String timeStr) { return parseTime(timeStr, TimeUnit.SECONDS); }  @SuppressWarnings({"unused", "WeakerAccess"}) static long nowInSeconds(); @SuppressWarnings("WeakerAccess") static int resolutionInSeconds(String resolutionStr); @SuppressWarnings("WeakerAccess") static long parseTimeInSeconds(String timeStr); @SuppressWarnings("WeakerAccess") static long parseTime(String timeStr, TimeUnit timeUnit); @SuppressWarnings("WeakerAccess") static long parseTimeInSeconds(long now, String timeStr); @SuppressWarnings("WeakerAccess") static long parseTime(long now, String timeStr, TimeUnit timeUnit);  }
@Test public void testParseTimestamp() { Assert.assertEquals(1234567890, TimeMathParser.parseTimeInSeconds("1234567890")); Assert.assertEquals(1234567890, TimeMathParser.parseTimeInSeconds(0, "1234567890")); }