Using XCTAssertNoThrow in test