Added some unit tests to prevent derps like the last commit