generateParts with tests