Added Unit Tests

Pending an intended change (a separate pull request coming), I've added unit tests for the existing implementation.