@Test
public void getTagClass() {

  Tag tag;
  tag = new Tag(0x55, Tag.UNIVERSAL, Tag.TagType.PRIMITIVE, 2);
  // TODO change these incomprehensible comparisons!
  Assert.assertEquals(Tag.UNIVERSAL, tag.getTagClass(), 2);
  tag = new Tag(0x55, Tag.APPLICATION, Tag.TagType.PRIMITIVE, 2);
  Assert.assertEquals(Tag.APPLICATION, tag.getTagClass(), 2);
  tag = new Tag(0x55, Tag.CONTEXT, Tag.TagType.PRIMITIVE, 2);
  Assert.assertEquals(Tag.CONTEXT, tag.getTagClass(), 2);
  tag = new Tag(0x55, Tag.PRIVATE, Tag.TagType.PRIMITIVE, 2);
  Assert.assertEquals(Tag.PRIVATE, tag.getTagClass(), 2);
  tag = new Tag(ByteArrayUtil.fromHex("1F550100"), 0);
  Assert.assertEquals(Tag.UNIVERSAL, tag.getTagClass());
  tag = new Tag(ByteArrayUtil.fromHex("5F550100"), 0);
  Assert.assertEquals(Tag.APPLICATION, tag.getTagClass());
  tag = new Tag(ByteArrayUtil.fromHex("BF550100"), 0);
  Assert.assertEquals(Tag.CONTEXT, tag.getTagClass());
  tag = new Tag(ByteArrayUtil.fromHex("DF550100"), 0);
  Assert.assertEquals(Tag.PRIVATE, tag.getTagClass());
}