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 encodeObjectIdentifierShouldThrowExceptionOnIllegalFirstValue() {
        thrown.expect(Asn1Exception.class);
        thrown.expectMessage("First id of object identifier must be 0, 1 or 2");
        Asn1Utils.encodeObjectIdentifier("3");

    }