### Question:
AddressRecordDecoder implements RecordDecoder { public Map<String, Object> decode( IoBuffer byteBuffer, short length ) throws IOException { Map<String, Object> attributes = new HashMap<>(); byte[] addressBytes = new byte[length]; byteBuffer.get( addressBytes ); attributes.put( Strings.toLowerCaseAscii( DnsAttribute.IP_ADDRESS ), InetAddress.getByAddress( addressBytes ) ); return attributes; }  Map<String, Object> decode( IoBuffer byteBuffer, short length );  }### Answer:
@Test public void testDecode() throws Exception { Map<String, Object> attributes = decoder.decode( inputBuffer, ( short ) address.getAddress().length ); assertEquals( address, attributes.get( Strings.toLowerCaseAscii( DnsAttribute.IP_ADDRESS ) ) ); }