Fixed unit test for discovery