class RetourPrefectureService {

    public void receiveAnomalieActe(EnveloppeMISILLCL enveloppeMISILLCL, AnomalieActe anomalieActe, Attachment attachment) {
        LocalAuthority localAuthority = localAuthorityRepository.findBySiren(enveloppeMISILLCL.getDestinataire().getSIREN())
                .orElseThrow(ActeNotFoundException::new);
        Acte acte = acteRepository.findFirstByNumberAndDecisionAndNatureAndLocalAuthority_UuidAndDraftNull(
                anomalieActe.getActeRecu().getNumeroInterne(),
                anomalieActe.getActeRecu().getDate(),
                ActeNature.code(anomalieActe.getActeRecu().getCodeNatureActe()),
                localAuthority.getUuid())
                .orElseThrow(ActeNotFoundException::new);
        publishActeHistory(acte.getUuid(), StatusType.NACK_RECEIVED, attachment,
                Optional.of(anomalieActe.getDetail()), Optional.empty());
    }

    public  RetourPrefectureService(ActeRepository acteRepository, ActeHistoryRepository acteHistoryRepository,
                                   LocalAuthorityRepository localAuthorityRepository, ApplicationEventPublisher applicationEventPublisher, ZipGeneratorUtil zipGeneratorUtil);

}