First get the list of nameservers for your domain by using the resolver to do an NS query.
For each nameserver:
Get the nameservers A (or AAAA) records by using the resolver to do an A (or AAAA) query.
Using one of the addresses returned, directly query the nameserver with dns.query.udp(), using whatever query is your check for goodness.
Check that the response is ok.