Preparation for SuffixArray support in test classes. A bit refactoring.