Change IndexWriter to an interface to allow for in memory mocks