Feature/write some tests

This pull request corresponds #4.