BindScanner extends AbstractScanner { protected ResourceRecordSet<Map<String, Object>> getRecord( String line) { String[] fields = line.split("\\s+"); Map<String, Object> rData = ToDnsRecord.toRData(fields[3], fields); ResourceRecordSet<Map<String, Object>> dnsRecord = new ResourceRecordSet<Map<String, Object>>(fields[0], Integer.parseInt(fields[1]), fields[2], fields[3], rData); return dnsRecord; } BindScanner(ScannerBuilder<? extends Scanner> builder); BindClient getBindClient(); @Override void scan();  }
@Test public void getRecordTest() { String line = "test.example.com. 60 IN A 10.10.10.10"; scanner = new BindScanner(null); ResourceRecordSet<Map<String, Object>> dnsRecord = scanner.getRecord(line); Assert.assertEquals(dnsRecord.getName(), "test.example.com"); }