public void Initialize()
        {
            _factoryStub = MockRepository.GenerateStub<IStreamFactory>();
            _textWriterMock = MockRepository.GenerateMock<TextWriter>();
            _streamMock = MockRepository.GenerateMock<Stream>();

            _factoryStub.Stub(f => f.CreateDictionaryStreamWriter($"{Filepath}.{CompressingIndexSerializer.DictionaryFileSuffix}"))
                .Return(_textWriterMock);
            _factoryStub.Stub(f => f.CreateDocumentIdsStream($"{Filepath}.{CompressingIndexSerializer.PostingsFileSuffix}", FileMode.Create)).Return(_streamMock);

            _encoderStub = MockRepository.GenerateStub<INumberEncoder>();
            _numberLengthReducerStub = MockRepository.GenerateStub<INumberLengthReducer>();
            _target = new CompressingIndexSerializer(_factoryStub, _encoderStub, _numberLengthReducerStub);
        }