@Test
public void testDecodeTemplateRecord() throws NotEnoughBytesException {

    byte[] data = IpfixUtilities.hexStringToByteArray("01030003008D000400290002802A000400000E91");
    IpfixTemplateRecord tr = new IpfixTemplateRecord(data);
    assertEquals(259, tr.getHeader().getId());
    assertEquals(3, tr.getHeader().getFieldCount());
    IpfixFieldSpecifier fsScope = tr.getFieldSpecifiers().get(0);
    assertFalse(fsScope.isEnterprise());
    assertEquals(141, fsScope.getInformationElementId());
    assertEquals(4, fsScope.getFieldLength());
    IpfixFieldSpecifier fsNotEnterprise = tr.getFieldSpecifiers().get(1);
    assertFalse(fsNotEnterprise.isEnterprise());
    assertEquals(41, fsNotEnterprise.getInformationElementId());
    assertEquals(2, fsNotEnterprise.getFieldLength());
    IpfixFieldSpecifier fsEnterprise = tr.getFieldSpecifiers().get(2);
    assertTrue(fsEnterprise.isEnterprise());
    assertEquals(42, fsEnterprise.getInformationElementId());
    assertEquals(4, fsEnterprise.getFieldLength());
    assertEquals(3729, fsEnterprise.getEnterpriseNumber());
}