}
public void test_ctor_7label() throws TextParseException
{
// 7 is the number of label positions that are cached
Name n = new Name("a.b.c.d.e.f.");
assertTrue(n.isAbsolute());
assertFalse(n.isWild());
assertEquals(7, n.labels());
assertEquals(13, 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[] { 0 }, n.getLabel(6)));
assertEquals("", n.getLabelString(6));
}