Added tests

https://gist.github.com/8r2y5/892416a260a70fb38d07