unit test for observer