Added write tests
Merge pull request #6 from flyboarder/master

added write tests