Adding unit tests to naive bayes indexes