Extracted parse method for unit tests