Improve unit tests involving observers