test observer pattern