SystemPropertyUtil { public static String get(String key) { return get(key, null); } private  SystemPropertyUtil(); static boolean contains(String key); static String get(String key); static String get(final String key, String def); static boolean getBoolean(String key, boolean def); static int getInt(String key, int def); static long getLong(String key, long def);  }
@Test(expected = NullPointerException.class) public void testGetWithKeyNull() { SystemPropertyUtil.get(null, null); }
@Test(expected = IllegalArgumentException.class) public void testGetWithKeyEmpty() { SystemPropertyUtil.get("", null); }
@Test public void testGetDefaultValueWithPropertyNull() { assertEquals("default", SystemPropertyUtil.get("key", "default")); }
@Test public void testGetPropertyValue() { System.setProperty("key", "value"); assertEquals("value", SystemPropertyUtil.get("key")); }