[Resolves #20] Better tests
Fix a part of #17
Merge pull request #21 from yahoo/tests

Tests