ObjectIdentifierUtils { public static byte[] getValue(String oid) throws TLVException { try { ASN1ObjectIdentifier oidObj = new ASN1ObjectIdentifier(oid); TLV oidTlv = TLV.fromBER(oidObj.getEncoded()); return oidTlv.getValue(); } catch (IllegalArgumentException | IOException ex) { throw new TLVException("Failed to parse OID.", ex); } }  static byte[] toByteArray(String oid); static String toString(byte[] oid); static byte[] getValue(String oid);  }
@Test public void testGetValue() throws TLVException { String oid = EACObjectIdentifier.id_PACE; byte[] expResult = new byte[]{0x04, 0x00, 0x7F, 0x00, 0x07, 0x02, 0x02, 0x04}; byte[] result = ObjectIdentifierUtils.getValue(oid); assertEquals(expResult, result); }