Adds unit tests for observer, stubs observer globally.