@Test
public void testNewInstanceForNonDefaultConstructorWithException() {

  try {
    ReflectionUtils.newInstance(
        NoDefaultCtor.class, null, new Class[]{int.class}, 1, 2);
    fail("Should have failed before this point");
  } catch (IllegalArgumentException e) {
    GenericTestUtils.assertExceptionContains(
        "1 parameters are required but 2 arguments are provided", e);
  }
  try {
    ReflectionUtils.newInstance(
        NoDefaultCtor.class, null, new Class[]{int.class});
    fail("Should have failed before this point");
  } catch (IllegalArgumentException e) {
    GenericTestUtils.assertExceptionContains(
        "1 parameters are required but 0 arguments are provided", e);
  }
}