@Test
public void roundtripUuid() throws Exception {

  final UUID originalUuid = UUID.randomUUID();
  final byte[] translatedUuid = UuidUtil.uuidToByteArray(originalUuid);
  final ByteBuffer buffer = ByteBuffer.wrap(translatedUuid);
  assertThat(new UUID(buffer.getLong(), buffer.getLong()), equalTo(originalUuid));
}