Length generation test. Utils.