@Test(groups = "asn1", dataProvider = "ints")
public void encode(
  final byte[] expected, final BigInteger integer, final BigInteger unsigned, final int unsignedPrim)
  throws Exception
{

  if (integer.intValue() == -1 && expected.length > 1) {
    // ignore multi byte negative 1
    Assert.assertTrue(expected.length > 1);
  } else {
    Assert.assertEquals(IntegerType.toBytes(integer), expected);
  }
}