Github user Abrasha commented on a diff in the pull request:

    https://github.com/apache/commons-lang/pull/256#discussion_r106018789
  
    --- Diff: 
src/test/java/org/apache/commons/lang3/reflect/MethodUtilsTest.java ---
    @@ -357,16 +369,23 @@ public void testInvokeMethod() throws Exception {
             assertEquals("foo(int)", MethodUtils.invokeMethod(testBean, "foo",
                     NumberUtils.BYTE_ONE));
             assertEquals("foo(double)", MethodUtils.invokeMethod(testBean, 
"foo",
    -                NumberUtils.LONG_ONE));
    -        assertEquals("foo(double)", MethodUtils.invokeMethod(testBean, 
"foo",
                     NumberUtils.DOUBLE_ONE));
             assertEquals("foo(String...)", MethodUtils.invokeMethod(testBean, 
"foo",
                     "a", "b", "c"));
             assertEquals("foo(String...)", MethodUtils.invokeMethod(testBean, 
"foo",
                     "a", "b", "c"));
             assertEquals("foo(int, String...)", 
MethodUtils.invokeMethod(testBean, "foo",
                     5, "a", "b", "c"));
    -
    +        assertEquals("foo(long...)", MethodUtils.invokeMethod(testBean, 
"foo",
    +                1L, 2L));
    +        
    +        try {
    +            MethodUtils.invokeMethod(testBean, "foo",
    +                    1, 2);
    +            fail("should throw NoSuchMethodException");
    +        } catch (final NoSuchMethodException e) {
    --- End diff --
    
    Maybe it will be better to extract it to another test method with expected 
exception?
    
    ```
    @Test(expected = NoSuchMethodException.class)
    public void methodName(){
    
    }
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to