@Test public void testMethodForSelector() throws SecurityException, NoSuchMethodException {

    assertNull(callbacks.methodForSelector("nosuch"));
    assertEquals(
        JavaImplementor.class.getDeclaredMethod("returnsIDTakesVoid"),                
        callbacks.methodForSelector("returnsIDTakesVoid"));
    assertEquals(
        JavaImplementor.class.getDeclaredMethod("returnsVoidTakesInt", int.class),                
        callbacks.methodForSelector("returnsVoidTakesInt:"));
    assertEquals(
        JavaImplementor.class.getDeclaredMethod("returnsVoidTakesInt_andInt", int.class, int.class),
        callbacks.methodForSelector("returnsVoidTakesInt:andInt:"));
    // wrong number of args
    assertNull(callbacks.methodForSelector("returnsVoidTakesVoid:")); 
    assertNull(callbacks.methodForSelector("returnsVoidTakesInt"));
}