Added tests.

Coverage after this change is 100%, according to istanbul.

=============================== Coverage summary ===============================
Statements   : 100% ( 20/20 )
Branches     : 100% ( 10/10 )
Functions    : 100% ( 6/6 )
Lines        : 100% ( 20/20 )
================================================================================