### Question:
FormulaFunctions { public static boolean matchArgumentTypes(List<Object> arguments, FormulaFunction function) { return matchArgumentTypes(arguments, function, false); }  static boolean matchArgumentTypes(List<Object> arguments, FormulaFunction function); static boolean matchArgumentTypes(List<Object> arguments, FormulaFunction function, boolean allowNull); static boolean matchArgumentCount(int nArguments, FormulaFunction function); static FormulaFunction findFirstMatch(List<Object> arguments, Collection<FormulaFunction> formulaFunctions); static Collection<FormulaFunction> findArgTypeMatch(List<Class<?>> argTypes, Collection<FormulaFunction> formulaFunctions); static String formatSignature(FormulaFunction function); static String format(String function, List<String> args);  }### Answer:
@Test public void matchArgumentTypes1() { FormulaFunction function = mock(FormulaFunction.class); when(function.isVarArgs()).thenReturn(false); when(function.getArgumentTypes()).thenReturn(Arrays.<Class<?>>asList(Number.class, String.class)); assertThat(FormulaFunctions.matchArgumentTypes(Arrays.<Object>asList(3.0, "test"), function), equalTo(true)); assertThat(FormulaFunctions.matchArgumentTypes(Arrays.<Object>asList("test", "test"), function), equalTo(false)); assertThat(FormulaFunctions.matchArgumentTypes(Arrays.<Object>asList(1.0, ""), function), equalTo(true)); assertThat(FormulaFunctions.matchArgumentTypes(Arrays.<Object>asList(1.0), function), equalTo(false)); assertThat(FormulaFunctions.matchArgumentTypes(Arrays.<Object>asList(3.0, "test", 1.0), function), equalTo(false)); assertThat(FormulaFunctions.matchArgumentTypes(Arrays.<Object>asList(3.0, "test", "test"), function), equalTo(false)); }
@Test public void matchArgumentTypes2() { FormulaFunction function = mock(FormulaFunction.class); when(function.isVarArgs()).thenReturn(true); when(function.getArgumentTypes()).thenReturn(Arrays.<Class<?>>asList(Number.class, String.class)); assertThat(FormulaFunctions.matchArgumentTypes(Arrays.<Object>asList(3.0, "test"), function), equalTo(true)); assertThat(FormulaFunctions.matchArgumentTypes(Arrays.<Object>asList("test", "test"), function), equalTo(false)); assertThat(FormulaFunctions.matchArgumentTypes(Arrays.<Object>asList(1.0, ""), function), equalTo(true)); assertThat(FormulaFunctions.matchArgumentTypes(Arrays.<Object>asList(1.0), function), equalTo(true)); assertThat(FormulaFunctions.matchArgumentTypes(Arrays.<Object>asList(3.0, "test", 1.0), function), equalTo(false)); assertThat(FormulaFunctions.matchArgumentTypes(Arrays.<Object>asList(3.0, "test", "test"), function), equalTo(true)); }