Test validateLengthOfData