invokeChange => triggerChange
use spy to test whether a function is called