*this.callback* is not guaranteed to exist until *FakeGeoPositionProvider.watch()* is called, so this observer should not assume it exists. But you don't have to test for it; instead, just move this observer registration to the *FakeGeoPositionProvider.watch()* method, since it doesn't matter until then anyway.