### Question:
ObjectMapTool { public static Date getDate(Map param, String key) { if (param == null || isEmpty(key)) { return null; } Object v = param.get(key); if (v == null) { return null; } Date d = DateUtil.getDateFromString(v.toString(), "yyyy-MM-dd HH:mm:ss"); return d; }  static Long parseLong(String input); static Double parseDouble(String input); static Integer parseInt(String input); static Float parseFloat(String input); static boolean isEmpty(String input); static boolean isEmpty(Object input); static boolean isEmpty(Collection<?> c); static boolean isNotEmpty(Collection<?> c); static boolean isEmpty(Object[] objs); static boolean isNullString(String str); static void removeNullItem(Map<? extends Object, ? extends Object> map); static Date getDate(Map param, String key); static Long getDateMs(Map param, String key); static Long getLong(Map param, String key); static Set<String> getStringSet(Map param, String key); static List<String> getStringList(Map param, String key); static List<Long> getLongList(Map param, String key); static List<Double> getDoubleList(Map param, String key); static Double getDouble(Map param, String key); static Float getFloat(Map param, String key); static List<Integer> getIntegerList(Map param, String key); static Integer getInteger(Map param, String key, int def); static Integer getInteger(Map param, String key); static String getString(Map param, String key); static boolean getBoolean(Map param, String key); static Byte getByte(Map param, String key); static Short getShort(Map param, String key); static T getObj(Map param, String key, Class<T> t); static T getObject(Map param, String key, Class<T> t);  }### Answer:
@Test public void testGetDate() { Map<String, String> map = new HashMap<>(); map.put("date","2017-01-01 11:11:11"); Date date = getDate(map, "date"); assertEquals(117, date.getYear()); Long l = getDateMs(map, "date"); assertEquals(Long.valueOf("1483240271000"), l); }