UuidType extends AbstractDERType implements DEREncoder { public static UUID decode(final DERBuffer encoded) { final long mostSig = readLong(encoded); final long leastSig = readLong(encoded); return new UUID(mostSig, leastSig); } UuidType(final UUID item);  UuidType(final DERTag tag, final UUID item); @Override byte[] encode(); static UUID decode(final DERBuffer encoded); static byte[] toBytes(final UUID uuid);  }
@Test(groups = "asn1", dataProvider = "uuids") public void decode(final byte[] bytes, final UUID expected) throws Exception { Assert.assertEquals(UuidType.decode(new DefaultDERBuffer(bytes)), expected); }