### Question:
Utility { public static String getEnvOrProp(String name) { String envVal = System.getenv(name); String sysPropVal = System.getProperty(name); if(sysPropVal != null) return sysPropVal; return envVal; }  static void checkJVMVersion(); static Properties getPropertiesFromFile(String file); static String getLocalHost(); static String getLocalAddress(); static java.rmi.Remote lookupObject(String publishedName,
					       java.lang.Class anInterface); static char[] toCharArray(final CharBuffer cb); static byte[] toByteArray(final ByteBuffer bb); static int bytesToInt(byte[] array, int offset); static void intToBytes(int value, byte[] array, int offset); static long bytesToLong(byte[] array, int offset); static void longToBytes(long value, byte[] array, int offset); static void invokeApplicationMain(Class mainClass, String[] args); static void invokeSetMethod(Object obj, String prop, String value); static void invokeSetMethodCaseInsensitive(Object obj, String prop, String value); static short intToShort(int value); static int shortToInt(short value); static ClassLoader getClassLoader(); static Class loadClass(String className); static ClassLoader setContextClassLoader(ClassLoader newClassLoader); static void setEnvironment(); static String getEnvOrProp(String name); static char[] convertByteArrayToCharArray(byte[] byteArray, String charset); static byte[] convertCharArrayToByteArray(char[] charArray, String strCharset);  }### Answer:
@Test public void testGetEnvOrProp() { Map<String, String> env = System.getenv(); Set<String> keys = env.keySet(); String key = null; String value = null; for (String akey : keys) { if(!StringUtils.ok(akey)) continue; if(System.getProperty(akey) != null) continue; String avalue = env.get(akey); if(!StringUtils.ok(avalue)) continue; key = akey; value = avalue; break; } if(key == null) return; assertEquals(Utility.getEnvOrProp(key), value); String sysPropValue = "SYS_PROP" + value; System.setProperty(key, sysPropValue); assertEquals(Utility.getEnvOrProp(key), sysPropValue); }