Fixed SynchronousInvocationHandler and updated the test