@Test
public void invokeMethodWithoutParam() {

    class MethodWithoutParam {
        String foo() {
            return "bar";
        }
    }
    assertThat(invokeMethod(new MethodWithoutParam(), "foo"), CoreMatchers.is("bar"));
}