@Test
public void getMethodArg() throws Exception {

    final String answer = "bubba";
    final Object[] args = new Object[] { null, answer, "blue" };
    final Method method = AOPTargetClass1.class.getDeclaredMethod("doIt", String.class, String.class, String.class);
    try {
        Utils.getMethodArg(-1, args, method.toString());
        fail("Expected Exception");
    } catch (InvalidParameterException ex) {
        assertTrue(ex.getMessage().indexOf("is invalid") != -1);
        System.out.println(ex.getMessage());
    }
    try {
        Utils.getMethodArg(3, args, method.toString());
        fail("Expected Exception");
    } catch (InvalidParameterException ex) {
        assertTrue(ex.getMessage().indexOf("too big") != -1);
        System.out.println(ex.getMessage());
    }
    try {
        Utils.getMethodArg(4, args, method.toString());
        fail("Expected Exception");
    } catch (InvalidParameterException ex) {
        assertTrue(ex.getMessage().indexOf("too big") != -1);
        System.out.println(ex.getMessage());
    }
    try {
        Utils.getMethodArg(0, args, method.toString());
        fail("Expected Exception");
    } catch (InvalidParameterException ex) {
        assertTrue(ex.getMessage().indexOf("null") != -1);
        System.out.println(ex.getMessage());
    }
    assertEquals(answer, Utils.getMethodArg(1, args, method.toString()));
}