Add Unit Test

Refactor Sort Algorithm To Easily Work With Unit Test