### Question:
ReflectionUtil { public static boolean matchesArguments(Constructor<?> constructor, Object[] arguments) { return matchesArguments(constructor.getParameterTypes(), arguments); } private  ReflectionUtil(); static boolean matchesArguments(Constructor<?> constructor, Object[] arguments); static boolean matchesArguments(Method method, Object[] arguments); static boolean matchesArguments(Class<?>[] argumentTypes, Object[] arguments); static boolean matchesType(Class<?> parameterType, Class<?> argumentType);  }### Answer:
@Test public void testMatchesArguments() { Assertions.assertThat(ReflectionUtil.matchesArguments( new Class<?>[] { int.class, double.class }, new Object[] { 123, 3.1416 })) .isEqualTo(true); assertThat(ReflectionUtil.matchesArguments( new Class<?>[] { String.class, Integer.class }, new Object[] { "Hello", 123 })) .isEqualTo(true); assertThat(ReflectionUtil.matchesArguments( new Class<?>[] { Integer.class }, new Object[] { "Hello"})) .isEqualTo(false); }
@Test public void testMatchesArgumentsNull() { assertThat(ReflectionUtil.matchesArguments( new Class<?>[] { String.class }, new Object[] { null })) .isEqualTo(true); assertThat(ReflectionUtil.matchesArguments( new Class<?>[] { int.class }, new Object[] { null })) .isEqualTo(false); }