@Test
public void testBlockedInet6DnsQuery() throws Exception {

    Message message = Message.newQuery(new ARecord(new Name("blocked.example.com."),
            0x01,
            3600,
            Inet4Address.getByAddress(new byte[]{0, 0, 0, 0})
    ));
    UdpPacket.Builder payLoadBuilder = new UdpPacket.Builder()
            .srcPort(UdpPort.DOMAIN)
            .dstPort(UdpPort.DOMAIN)
            .srcAddr((Inet6Address) Inet6Address.getByName("::0"))
            .dstAddr((Inet6Address) Inet6Address.getByName("::1"))
            .correctChecksumAtBuild(true)
            .correctLengthAtBuild(true)
            .payloadBuilder(
                    new UnknownPacket.Builder()
                            .rawData(message.toWire())
            );
    IpPacket ipOutPacket = new IpV6Packet.Builder()
            .version(IpVersion.IPV6)
            .trafficClass(IpV6SimpleTrafficClass.newInstance((byte) 0))
            .flowLabel(IpV6SimpleFlowLabel.newInstance(0))
            .nextHeader(IpNumber.UDP)
            .srcAddr((Inet6Address) Inet6Address.getByName("::0"))
            .dstAddr((Inet6Address) Inet6Address.getByName("::1"))
            .correctLengthAtBuild(true)
            .payloadBuilder(payLoadBuilder)
            .build();
    dnsPacketProxy.handleDnsRequest(ipOutPacket.getRawData());
    assertNotNull(mockEventLoop.lastResponse);
    assertNull(mockEventLoop.lastOutgoing);
    assertTrue(mockEventLoop.lastResponse instanceof IpPacket);
    assertTrue(mockEventLoop.lastResponse.getPayload() instanceof UdpPacket);
    Message responseMsg = new Message(mockEventLoop.lastResponse.getPayload().getPayload().getRawData());
    assertEquals(NOERROR, responseMsg.getHeader().getRcode());
    assertArrayEquals(new Record[] {}, responseMsg.getSectionArray(Section.ANSWER));
    assertNotEquals(0, responseMsg.getSectionArray(Section.AUTHORITY).length);
    assertTrue(responseMsg.getSectionArray(Section.AUTHORITY)[0] instanceof SOARecord);
    assertTrue(responseMsg.getSectionArray(Section.AUTHORITY)[0].getTTL() > 0);
}