class CassandraMailboxIdDeserializer implements MailboxIdDeserializer {

    @Override
    public CassandraId deserialize(String serializedMailboxId) throws MailboxIdDeserialisationException {
        try {
            return CassandraId.of(UUID.fromString(serializedMailboxId));
        } catch (Exception e) {
            throw new MailboxIdDeserialisationException("Error de-serialising " + serializedMailboxId, e);
        }
    }

}