cf.addInterface(SimpleService.class);
cf.addMethod(Modifier.PUBLIC, new MethodSignature(int.class, "add", new Class[]
{ int.class, int.class }, null), "return $1 + $2;");
Class targetClass = cf.createClass();
SimpleService s = (SimpleService) targetClass.newInstance();
assertEquals(207, s.add(99, 108));
}