Type CCC doesnt conform to protocol 'NSObjectProtocol'

If you follow up the inheritance chain, NSURLSessionDataDelegate inherits NSURLSessionTaskDelegate, which inherits NSURLSessionDelegate, which inherits, NSObjectProtocol. This protocol has various required methods like isEqual(_:) and respondsToSelector(_:) which you class does not implement.

Generally what you would do here is make your class inherit NSObject which conforms to NSObjectProtocol:

class Test: NSObject, NSURLSessionDataDelegate {
    ...
}