@Test
public void testCheckIfArgumentsMatchParameterTypesShouldThrowIllegalArgumentExceptionIfMoreArgumentsThanParametersAreGiven() {

    // Given:
    Object[] arguments = new Object[] { 0, "b", false, 'd' };
    Class<?>[] parameterTypes = new Class<?>[] { int.class, String.class, boolean.class };
    expectedException.expect(IllegalArgumentException.class);
    expectedException
            .expectMessage("Expected at most 3 arguments for test method but got 4.");
    // When:
    underTest.checkIfArgumentsMatchParameterTypes(arguments, parameterTypes);
    // Then: expect exception
}