added: Ex5 unit tests

Hi Eric.
This is unit tests for Ex5 (week 6).
Source https://class.coursera.org/ml-005/forum/thread?thread_id=2137

I'm off for two weeks.
Good luck.
Valentin.