}
public void test_ctor_8label() throws TextParseException
{
// 7 is the number of label positions that are cached
Name n = new Name("a.b.c.d.e.f.g.");
assertTrue(n.isAbsolute());
assertFalse(n.isWild());
assertEquals(8, n.labels());
assertEquals(15, n.length());
assertTrue(Arrays.equals(new byte[] { 1, 'a' }, n.getLabel(0)));
assertEquals("a", n.getLabelString(0));
assertTrue(Arrays.equals(new byte[] { 1, 'b' }, n.getLabel(1)));
assertEquals("b", n.getLabelString(1));
assertTrue(Arrays.equals(new byte[] { 1, 'c' }, n.getLabel(2)));
assertEquals("c", n.getLabelString(2));
assertTrue(Arrays.equals(new byte[] { 1, 'd' }, n.getLabel(3)));
assertEquals("d", n.getLabelString(3));
assertTrue(Arrays.equals(new byte[] { 1, 'e' }, n.getLabel(4)));
assertEquals("e", n.getLabelString(4));
assertTrue(Arrays.equals(new byte[] { 1, 'f' }, n.getLabel(5)));
assertEquals("f", n.getLabelString(5));
assertTrue(Arrays.equals(new byte[] { 1, 'g' }, n.getLabel(6)));
assertEquals("g", n.getLabelString(6));
assertTrue(Arrays.equals(new byte[] { 0 }, n.getLabel(7)));
assertEquals("", n.getLabelString(7));
}