class Util {

    public static long parseTimestamp(String timestampString) {
        try {
            Date date = Constant.DATE_FORMAT_ARGS.parse(timestampString);
            if (date.compareTo(new Date(System.currentTimeMillis())) > 0)
                throw new IllegalArgumentException(Constant.MESSAGE_INVALID_DATE_FORMAT);
            return date.getTime();
        } catch (ParseException e) {
            throw new IllegalArgumentException(Constant.MESSAGE_INVALID_DATE_FORMAT);
        }
    }

    private  Util();

}