OidType extends AbstractDERType implements DEREncoder { @Override public byte[] encode() { return encode(derItem); } OidType(final String item);  OidType(final int[] item);  OidType(final DERTag tag, final String item);  OidType(final DERTag tag, final int[] item); @Override byte[] encode(); static String decode(final DERBuffer encoded); static byte[] toBytes(final int[] oid); static int[] parse(final String oid);  }
@Test(groups = "asn1", dataProvider = "oids") public void encode(final byte[] expected, final String oid) throws Exception { Assert.assertEquals(OidType.toBytes(OidType.parse(oid)), expected); }