Moved to XCTest

I have converted the code to support XCTest.