Swift unittest + fix