class SerializableReIndexingExecutionFailures {

    public static SerializableReIndexingExecutionFailures from(ReIndexingExecutionFailures reIndexingExecutionFailures) {
        return new SerializableReIndexingExecutionFailures(
            reIndexingExecutionFailures.messageFailures()
                .stream()
                .map(failure -> new SerializableReIndexingExecutionFailures.SerializableReIndexingFailure(failure.getMailboxId(), failure.getUid()))
                .collect(Guavate.toImmutableList()));
    }

    public  SerializableReIndexingExecutionFailures(List<SerializableReIndexingFailure> failures);

}