Added unit test for observer