Had to separate out the common code in NativeEngines990KnnVectorsWriter to make it easy to write tests. Mocking was difficult to do with the functional interfaces and it was throwing NPE in the test especially with the mock of NativeIndexWriter::flush and NativeIndexWriter::merge where it wasn't able to recognize the mocked writer.
Check List
[x] New functionality includes testing.
[x] Commits are signed per the DCO using --signoff.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.
Had to separate out the common code in NativeEngines990KnnVectorsWriter to make it easy to write tests. Mocking was difficult to do with the functional interfaces and it was throwing NPE in the test especially with the mock of NativeIndexWriter::flush and NativeIndexWriter::merge where it wasn't able to recognize the mocked writer.
Check List
--signoff
.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.