### Question:
ParamChecker { public static boolean isMember(String item, String[] members, String name) { for (int i = 0; i < members.length; i++) { if (members[i].equals(item)) { return true; } } StringBuilder buff = new StringBuilder(); for (int i = 0; i < members.length; i++) { buff.append(members[i]).append(", "); } throw new IllegalArgumentException(XLog.format("parameter [{0}] = [{1}] " + "must be in the list {2}", name, item, buff.toString())); }  static String notEmpty(String str, String name); static String notEmpty(String str, String name, String info); static List<String> notEmptyElements(List<String> list, String name); static String validateActionName(String actionName); static boolean isValidIdentifier(String token); static int checkGTZero(int value, String name); static int checkGEZero(int value, String name); static int checkLEZero(int value, String name); static int checkInteger(String val, String name); static String checkFrequency(String val); static Date checkDateOozieTZ(String date, String name); static TimeZone checkTimeZone(String tzStr, String name); static boolean isMember(String item, String[] members, String name);  }### Answer:
@Test public void testIsMember() { String[] members = {"LIFO", "FIFO", "ONLYLAST"}; ParamChecker.isMember("FIFO", members, "test"); try { ParamChecker.isMember("FIF", members, "test"); fail(); } catch (Exception ex) { } }