### Question:
ConversionUtil { public static int toInt(Object value) { if (value instanceof Number) { return ((Number) value).intValue(); } else { return Integer.parseInt(String.valueOf(value)); } } private  ConversionUtil(); static int toInt(Object value); static boolean toBoolean(Object value); static String[] toStringArray(Object value); static String toString(int value);  }### Answer:
@Test public void testNumberToInt() { assertEquals(42, ConversionUtil.toInt(Long.valueOf(42))); }
@Test public void testStringToInt() { assertEquals(42, ConversionUtil.toInt("42")); }