public static byte[] encodeObjectIdentifier(String oid) {
        try (final ByteArrayOutputStream bos = new ByteArrayOutputStream(oid.length() / 3 + 1)) {
            encodeObjectIdentifier(oid, bos);
            return bos.toByteArray();
        } catch (IOException e) {
            throw new Asn1Exception("Unexpected IO exception", e);
        }
    }
@Test
    public void encodeObjectIdentifierOfSingleBytes() {
        assertArrayEquals(new byte[] { 0x01, 0x02 }, Asn1Utils.encodeObjectIdentifier("0.1.2"));
    }