@Test
public void getMethodArgs() throws Exception {

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