Added unit tests

Forgot to migrate those over.