Unittests

Gist: https://gist.github.com/Neob91/773c38b52491c760c3eb