Added tests

Pretty basic, only cover the few edge cases I could think of in 5
minutes