Unit tests for new ensureIndexes methods.