### Question:
Lang { public static int linearSearch(Object[] oArray, Object obj) { if (oArray == null || obj == null) { return -1; } int oLen = oArray.length; for (int i = 0; i < oLen; i++) { if (oArray[i].equals(obj)) { return i; } } return -1; }  static String RPAD(String str, int len); static String RPAD(String str, char c, int len); static String LPAD(String str, int len); static String LPAD(String str, char c, int len); static String truncate(String str, int len); static T NVL(T first, T second); static int linearSearch(Object[] oArray, Object obj); static int linearSearch(Iterable<?> oArray, Object obj); static boolean isInteger(String s); static boolean isDouble(String s); static String stringList(Object[] array, String separator); static String stringList(Iterable<?> array, String separator); static String dblStr(double x); static String milliStr(long milliseconds); static T setAtFill(List<T> list, int ndx, T item); static String getClasspath(); static void addPath(URLClassLoader urlClassLoader, URL u); static void loadedDependencies(String verboseclassOut); static String stackString(Throwable t); static String urlEncode(String preEncode); static String fullURLEncode(String preEncode); static String urlDecode(String encoded); static T error(Throwable t); static T deepCopy(T obj); static final String pWhite_Space; }### Answer:
@Test public void testLinearSearch() { String[] animals = {"Dog", "Cat", "Mouse", "Dog"}; assertEquals(1, Lang.linearSearch(animals, "Cat")); assertEquals(-1, Lang.linearSearch(animals, "NotAnAnimal")); assertEquals(0, Lang.linearSearch(animals, "Dog")); assertEquals(-1, Lang.linearSearch((Object[])null, "Dog")); assertEquals(-1, Lang.linearSearch(animals, null)); }