Added test coverage using the Xcode XCTest framework.