Corrected string parsing in test