Moved unit test to top of file.