### Question:
FunctionalSetterInvoker extends MethodNamedObject implements SetterInvoker { public static FunctionalSetterInvoker create(String name, Method method) { return new FunctionalSetterInvoker(name, method); } private  FunctionalSetterInvoker(String name, Method method); static FunctionalSetterInvoker create(String name, Method method); @Override void invoke(Object object, @Nullable Object parameter); @Override Type getParameterType(); @Override Class<?> getParameterRawType();  }### Answer:
@Test public void testException() throws Exception { thrown.expect(ClassCastException.class); thrown.expectMessage("function[class org.jfaster.mango.invoker.FunctionalSetterInvokerTest$StringToIntegerFunction] on method[void org.jfaster.mango.invoker.FunctionalSetterInvokerTest$E.setX(java.lang.String)] error, method's parameterType[class java.lang.String] must be assignable from function's outputType[class java.lang.Integer]"); Method method = E.class.getDeclaredMethod("setX", String.class); FunctionalSetterInvoker.create("x", method); }
@Test public void testException2() throws Exception { thrown.expect(ClassCastException.class); thrown.expectMessage("function[class org.jfaster.mango.invoker.FunctionalSetterInvokerTest$StringToIntegerListFunction] on method[void org.jfaster.mango.invoker.FunctionalSetterInvokerTest$F.setX(java.util.List)] error, method's parameterType[java.util.List<java.lang.String>] must be assignable from function's outputType[java.util.List<java.lang.Integer>]"); Method method = F.class.getDeclaredMethod("setX", List.class); FunctionalSetterInvoker.create("x", method); }