Test cases updated in solution.

(begin-for-test) function added in solution.