replace deprecated API in tests, update tests for XCode 6.1.