MonetaryFunctions { public static boolean isValid(String[] values) { try { if (values[2].equalsIgnoreCase("randompositive") || values[2].equalsIgnoreCase("randomnegative") && NumberUtils.isDigits(values[3])) { return true; } return false; } catch (Exception ex) { return false; } }  static boolean isValid(String[] values); static String executeFunction(String[] values);  }
@Test public void testIsValid_1() throws Exception { String[] values = new String[] {}; boolean result = MonetaryFunctions.isValid(values); assertEquals(false, result); }
@Test public void testIsValid_2() throws Exception { String[] values = new String[] { null, null, "", "" }; boolean result = MonetaryFunctions.isValid(values); assertEquals(false, result); }
@Test public void testIsValid_3() throws Exception { String[] values = new String[] { null, null, "" }; boolean result = MonetaryFunctions.isValid(values); assertEquals(false, result); }
@Test public void testIsValid_4() throws Exception { String[] values = new String[] { null, null, "", "" }; boolean result = MonetaryFunctions.isValid(values); assertEquals(false, result); }