Add Unit Test.

Will merge in when finished.
Just putting the PR here for discussion.