Add unit tests

Closes #42
The outer context on line 10 seems to be the opposite of this.