@Test(expected = DataTypeLengthMismatchException.class)
public void testDecodeUnsigned8LengthMismatch() throws UtilityException, DataTypeLengthMismatchException, UnknownHostException, MissingAbstractDataTypeException {

    byte[] data = IpfixUtilities.hexStringToByteArray("02");
    int length = 2;
    IpfixDataRecordDecodeMethod method = new DecodeUnsigned8();
    String value = method.decodeDataRecord(data, length);
    assertEquals("2", value);
}