Hi there, I'm from the Xbox Live Technical Support Team.

If you failed the Xbox Live test and got a Z code 8015-190D, then it means your console is automatically banned on Xbox Live and that is irreversible. No questions asked.
Z - 0000-0000 is usually just a connection issue. You should try connecting the console directly to a modem or try it at another location (like at a friend's house and more preferably the ISP should be different from what you are using) and check if that would work.
As for the Z code AFFF-0016, we've been getting a lot of calls like these over the past 2-3 weeks now. This issue is currently being investigated. If you are experiencing this issue and you are using a console which was sent back to you from repair (refurbished consoles), try the usual steps like powercycling your console and networking devices; or try a wired, direct connection with your modem (NOT routers and gateways - if you have these and cannot do a direct modem connection, open the ff. ports in your router or gateway: UDP 88, UDP 3074, TCP 3074 and also try enabling UPnP), or try connecting the affected console at a different place and location. If you are still getting the Z: AFFF-0016 status code, please call tech support and when you do, make sure you have the ff. information ready:
- the replacement console's serial number (accessible at settings-console settings-system info)
- the replacement console's console ID (same location)
- service request number/reference number of the console repair that was given to you by the hardware department back then to track the status of your repair (or if you don't have this anymore, at least kindly confirm that you indeed had the console repaired or just provide the serial number for us to track it down).
If all of these requirements are met, the issue would then be escalated to the upper management. You would most likely be asked for callback details so that a supervisor would be able to contact you as for what resolution would be reached regarding this issue.
Good luck!