### Question:
Parameter { public static int intValue(String key, int defaultValue) { return (int) longValue(key, defaultValue); }  static String value(String key); static String value(String key, String defaultValue); static boolean boolValue(String key, boolean defaultValue); static int intValue(String key, int defaultValue); static long longValue(String key, long defaultValue);  }### Answer:
@Test public void testIntValue() { System.setProperty("int1", "1GB"); System.setProperty("int2", "1GiB"); System.setProperty("int3", "1MB"); System.setProperty("int4", "1MiB"); System.setProperty("int5", "1KB"); System.setProperty("int6", "1KiB"); assertEquals(1024 * 1024 * 1024, Parameter.intValue("int1", 0)); assertEquals(1000 * 1000 * 1000, Parameter.intValue("int2", 0)); assertEquals(1024 * 1024, Parameter.intValue("int3", 0)); assertEquals(1000 * 1000, Parameter.intValue("int4", 0)); assertEquals(1024, Parameter.intValue("int5", 0)); assertEquals(1000, Parameter.intValue("int6", 0)); assertEquals(0, Parameter.intValue("baz", 0)); boolean success = false; try { Parameter.intValue("", 0); } catch (IllegalArgumentException ex) { success = true; } assertTrue(success); success = false; try { Parameter.intValue(null, 0); } catch (NullPointerException ex) { success = true; } assertTrue(success); }