Wales full-back Leigh Halfpenny felt he came through a test of character during Saturday's game with Scotland at Murrayfield.