fix DiscoveryWriterTest unit test