Extracted Parser for pin entry and added test for it