@Test
public void testKeyMethodArgs() throws Exception {

    try {
        cut.getKeyMethod(new KeyObject01());
        fail("Expected exception.");
    } catch (InvalidAnnotationException ex) {
        assertTrue(ex.getMessage().indexOf("0 arguments") != -1);
        System.out.println(ex.getMessage());
    }
    try {
        cut.getKeyMethod(new KeyObject02());
        fail("Expected exception.");
    } catch (InvalidAnnotationException ex) {
        assertTrue(ex.getMessage().indexOf("String") != -1);
        System.out.println(ex.getMessage());
    }
    try {
        cut.getKeyMethod(new KeyObject03());
        fail("Expected exception.");
    } catch (InvalidAnnotationException ex) {
        assertTrue(ex.getMessage().indexOf("String") != -1);
        System.out.println(ex.getMessage());
    }
    try {
        cut.getKeyMethod(new KeyObject04());
        fail("Expected exception.");
    } catch (InvalidAnnotationException ex) {
        assertTrue(ex.getMessage().indexOf("only one method") != -1);
        System.out.println(ex.getMessage());
    }
    assertEquals("doIt", cut.getKeyMethod(new KeyObject05()).getName());
    assertEquals("toString", cut.getKeyMethod(new KeyObject06(null)).getName());
}