### Question:
NameServerRecordDecoder implements RecordDecoder { public Map<String, Object> decode( IoBuffer byteBuffer, short length ) throws IOException { Map<String, Object> map = new HashMap<>(); map.put( Strings.toLowerCaseAscii( DnsAttribute.DOMAIN_NAME ), DnsMessageDecoder.getDomainName( byteBuffer ) ); return map; }  Map<String, Object> decode( IoBuffer byteBuffer, short length );  }### Answer:
@Test public void testDecode() throws Exception { Map<String, Object> attributes = decoder.decode( inputBuffer, ( short ) inputBuffer.remaining() ); assertEquals( domainName, attributes.get( Strings.toLowerCaseAscii( DnsAttribute.DOMAIN_NAME ) ) ); }