| 495 | } |
| 496 | |
| 497 | static void test(Context context) throws UnknownHostException { |
| 498 | test(context, "gmail.com", "ns"); |
| 499 | test(context, "web.de", "mx"); |
| 500 | test(context, "_imaps._tcp.gmail.com", "srv"); |
| 501 | test(context, "gmail.com", "txt"); |
| 502 | test(context, "outlook.office365.com", "a"); |
| 503 | test(context, "outlook.office365.com", "aaaa"); |
| 504 | test(context, "posteo.de", "a"); |
| 505 | test(context, "non.existent.tld", "a"); |
| 506 | test(context, "rubbish", "a"); |
| 507 | } |
| 508 | |
| 509 | private static void test(Context context, String name, String type) { |
| 510 | DnsRecord[] records = lookup(context, name, type); |