NumberUtils { public static boolean isLong(Class<?> clazz) { return Long.class.equals(clazz) || long.class.equals(clazz); } private  NumberUtils(); static String format(Object value); static boolean isDouble(Class<?> clazz); static boolean isDouble(Object value); static boolean isFloat(Class<?> clazz); static boolean isInteger(Class<?> clazz); static boolean isInteger(Object value); static boolean isLong(Class<?> clazz); static boolean isLong(Object value); static boolean isNumeric(Class<?> clazz);  }
@Test public void testIsLong() { assertTrue(NumberUtils.isLong(Long.class)); assertTrue(NumberUtils.isLong(long.class)); assertFalse(NumberUtils.isLong(Integer.class)); }
@Test public void testIsLong2() { assertFalse(NumberUtils.isLong(null)); assertTrue(NumberUtils.isLong(1L)); assertTrue(NumberUtils.isLong(Long.valueOf("123"))); assertFalse(NumberUtils.isLong(new Object())); assertFalse(NumberUtils.isLong(12345)); }