@Test(groups = "asn1")
public void testToNode()
  throws Exception
{

  Assert.assertEquals(DERPath.toNode("SEQ").getName(), "SEQ");
  Assert.assertEquals(DERPath.toNode("SEQ").getChildIndex(), -1);
  Assert.assertEquals(DERPath.toNode("APP(4)").getName(), "APP(4)");
  Assert.assertEquals(DERPath.toNode("APP(4)").getChildIndex(), -1);
  Assert.assertEquals(DERPath.toNode("ENUM[0]").getName(), "ENUM");
  Assert.assertEquals(DERPath.toNode("ENUM[0]").getChildIndex(), 0);
  Assert.assertEquals(DERPath.toNode("OCTSTR[1]").getName(), "OCTSTR");
  Assert.assertEquals(DERPath.toNode("OCTSTR[1]").getChildIndex(), 1);
  Assert.assertEquals(DERPath.toNode("INT[3]").getName(), "INT");
  Assert.assertEquals(DERPath.toNode("INT[3]").getChildIndex(), 3);
  Assert.assertEquals(DERPath.toNode("CTX(0)").getName(), "CTX(0)");
  Assert.assertEquals(DERPath.toNode("CTX(0)").getChildIndex(), -1);
}