assertEquals(exp, n);
}
public void test_fromDNAME_toobig() throws NameTooLongException, TextParseException
{
Name own = new Name("the.owner.");
Name alias = new Name("the.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc.");
DNAMERecord dnr = new DNAMERecord(own, DClass.IN, 0xABCD, alias);
Name sub = new Name("ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd.the.owner.");
try {
sub.fromDNAME(dnr);
fail("NameTooLongException not thrown");
}
catch(NameTooLongException e){}
}