@Test public void testReceiveARActe() throws IOException, JAXBException { given(acteRepository.findByMiatId(anyString())) .willReturn(Optional.of(acte())); Pair<ARActe, Attachment> parsedData = parseClassPathResource("/data/006-210600235-20180522-684-AI-1-2_5279.xml", ARActe.class); retourPrefectureService.receiveARActe(parsedData.getLeft(), parsedData.getRight()); verify(acteRepository).findByMiatId("006-210600235-20180522-684-AI"); verify(retourPrefectureService).publishActeHistory(eq("uuid"), eq(StatusType.ACK_RECEIVED), eq(parsedData.getRight()), eq(Optional.empty()), eq(Optional.empty())); }
public void receiveARActe(ARActe arActe, Attachment attachment) { Acte acte = getByMiatId(arActe.getIDActe()); publishActeHistory(acte.getUuid(), StatusType.ACK_RECEIVED, attachment, Optional.empty(), Optional.empty()); }
RetourPrefectureService { public void receiveARActe(ARActe arActe, Attachment attachment) { Acte acte = getByMiatId(arActe.getIDActe()); publishActeHistory(acte.getUuid(), StatusType.ACK_RECEIVED, attachment, Optional.empty(), Optional.empty()); } }
RetourPrefectureService { public void receiveARActe(ARActe arActe, Attachment attachment) { Acte acte = getByMiatId(arActe.getIDActe()); publishActeHistory(acte.getUuid(), StatusType.ACK_RECEIVED, attachment, Optional.empty(), Optional.empty()); } RetourPrefectureService(ActeRepository acteRepository, ActeHistoryRepository acteHistoryRepository,
                                   LocalAuthorityRepository localAuthorityRepository, ApplicationEventPublisher applicationEventPublisher, ZipGeneratorUtil zipGeneratorUtil); }
RetourPrefectureService { public void receiveARActe(ARActe arActe, Attachment attachment) { Acte acte = getByMiatId(arActe.getIDActe()); publishActeHistory(acte.getUuid(), StatusType.ACK_RECEIVED, attachment, Optional.empty(), Optional.empty()); } RetourPrefectureService(ActeRepository acteRepository, ActeHistoryRepository acteHistoryRepository,
                                   LocalAuthorityRepository localAuthorityRepository, ApplicationEventPublisher applicationEventPublisher, ZipGeneratorUtil zipGeneratorUtil); void receiveARActe(ARActe arActe, Attachment attachment); void receiveARAnnulation(ARAnnulation arAnnulation, Attachment attachment); void receiveAnomalieActe(EnveloppeMISILLCL enveloppeMISILLCL, AnomalieActe anomalieActe, Attachment attachment); void receiveAnomalieEnveloppe(AnomalieEnveloppe anomalieEnveloppe, Attachment attachment); void receiveCourrierSimple(CourrierSimple courrierSimple, Attachment attachment); void receiveDemandePieceComplementaire(DemandePieceComplementaire demandePieceComplementaire, Attachment attachment); void receiveLettreObservations(LettreObservations lettreObservations, Attachment attachment); void receiveDefere(DefereTA defereTA, List<Attachment> attachments); void receiveARPieceComplementaire(ARReponseCL arReponseCL, Attachment attachment); void receiveARReponseRejetLettreObservations(ARReponseCL arReponseCL, Attachment attachment); }
RetourPrefectureService { public void receiveARActe(ARActe arActe, Attachment attachment) { Acte acte = getByMiatId(arActe.getIDActe()); publishActeHistory(acte.getUuid(), StatusType.ACK_RECEIVED, attachment, Optional.empty(), Optional.empty()); } RetourPrefectureService(ActeRepository acteRepository, ActeHistoryRepository acteHistoryRepository,
                                   LocalAuthorityRepository localAuthorityRepository, ApplicationEventPublisher applicationEventPublisher, ZipGeneratorUtil zipGeneratorUtil); void receiveARActe(ARActe arActe, Attachment attachment); void receiveARAnnulation(ARAnnulation arAnnulation, Attachment attachment); void receiveAnomalieActe(EnveloppeMISILLCL enveloppeMISILLCL, AnomalieActe anomalieActe, Attachment attachment); void receiveAnomalieEnveloppe(AnomalieEnveloppe anomalieEnveloppe, Attachment attachment); void receiveCourrierSimple(CourrierSimple courrierSimple, Attachment attachment); void receiveDemandePieceComplementaire(DemandePieceComplementaire demandePieceComplementaire, Attachment attachment); void receiveLettreObservations(LettreObservations lettreObservations, Attachment attachment); void receiveDefere(DefereTA defereTA, List<Attachment> attachments); void receiveARPieceComplementaire(ARReponseCL arReponseCL, Attachment attachment); void receiveARReponseRejetLettreObservations(ARReponseCL arReponseCL, Attachment attachment);  }