Updated test case and removed gossip file moved code to bean factory