@Test public void testAddBubbleMessage() { final CommandMeta meta = mock(CommandMeta.class); final Stream<BaseTransactionEvent> events = Stream.of(mock(BaseTransactionEvent.class)); languageTranslatorImplUnderTest.addBubbleMessage(meta, events); verify(mockBubbleCache, atLeastOnce()).addBubble(anyString(), any(BubbleMessage.class)); }
public void addBubbleMessage(CommandMeta meta, Stream<BaseTransactionEvent> events) { BubbleMessage bubbleMessage = BubbleMessage.builder() .LTX(meta.getLTX()) .GLTX(meta.getGTX()) .FLTX(meta.getFLTX()) .PGTX(meta.getPGTX()) .trace(meta.getTraceId()) .commande(meta.getCommandId()) .build(); events.forEach(e->{ getBubbleCache().addBubble(e.getId(), bubbleMessage); }); }
LanguageTranslatorImpl implements LanguageTranslator { public void addBubbleMessage(CommandMeta meta, Stream<BaseTransactionEvent> events) { BubbleMessage bubbleMessage = BubbleMessage.builder() .LTX(meta.getLTX()) .GLTX(meta.getGTX()) .FLTX(meta.getFLTX()) .PGTX(meta.getPGTX()) .trace(meta.getTraceId()) .commande(meta.getCommandId()) .build(); events.forEach(e->{ getBubbleCache().addBubble(e.getId(), bubbleMessage); }); } }
LanguageTranslatorImpl implements LanguageTranslator { public void addBubbleMessage(CommandMeta meta, Stream<BaseTransactionEvent> events) { BubbleMessage bubbleMessage = BubbleMessage.builder() .LTX(meta.getLTX()) .GLTX(meta.getGTX()) .FLTX(meta.getFLTX()) .PGTX(meta.getPGTX()) .trace(meta.getTraceId()) .commande(meta.getCommandId()) .build(); events.forEach(e->{ getBubbleCache().addBubble(e.getId(), bubbleMessage); }); } @Autowired  LanguageTranslatorImpl(CommandRepository commandRepository, ApplicationEventPublisher publisher,
			BubbleCache bubbleCache, DecoderRegistry decoderRegistry, KermossTxLogger txLogger); }
LanguageTranslatorImpl implements LanguageTranslator { public void addBubbleMessage(CommandMeta meta, Stream<BaseTransactionEvent> events) { BubbleMessage bubbleMessage = BubbleMessage.builder() .LTX(meta.getLTX()) .GLTX(meta.getGTX()) .FLTX(meta.getFLTX()) .PGTX(meta.getPGTX()) .trace(meta.getTraceId()) .commande(meta.getCommandId()) .build(); events.forEach(e->{ getBubbleCache().addBubble(e.getId(), bubbleMessage); }); } @Autowired  LanguageTranslatorImpl(CommandRepository commandRepository, ApplicationEventPublisher publisher,
			BubbleCache bubbleCache, DecoderRegistry decoderRegistry, KermossTxLogger txLogger); void registerDecoder(String subject, BaseDecoder baseDecoder); @Async @TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT) @Transactional(propagation = Propagation.REQUIRES_NEW) void onCommandStarted(final InboundCommandStarted commandStarted); @Override @EventListener void onCommandPrepared(InboundCommandPrepared commandPrepared); void addBubbleMessage(CommandMeta meta, Stream<BaseTransactionEvent> events); BubbleCache getBubbleCache(); CommandRepository getCommandRepository(); ApplicationEventPublisher getPublisher(); Map<String, BaseDecoder> getDecoders(); void setDecoders(DecoderRegistry decoders); }
LanguageTranslatorImpl implements LanguageTranslator { public void addBubbleMessage(CommandMeta meta, Stream<BaseTransactionEvent> events) { BubbleMessage bubbleMessage = BubbleMessage.builder() .LTX(meta.getLTX()) .GLTX(meta.getGTX()) .FLTX(meta.getFLTX()) .PGTX(meta.getPGTX()) .trace(meta.getTraceId()) .commande(meta.getCommandId()) .build(); events.forEach(e->{ getBubbleCache().addBubble(e.getId(), bubbleMessage); }); } @Autowired  LanguageTranslatorImpl(CommandRepository commandRepository, ApplicationEventPublisher publisher,
			BubbleCache bubbleCache, DecoderRegistry decoderRegistry, KermossTxLogger txLogger); void registerDecoder(String subject, BaseDecoder baseDecoder); @Async @TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT) @Transactional(propagation = Propagation.REQUIRES_NEW) void onCommandStarted(final InboundCommandStarted commandStarted); @Override @EventListener void onCommandPrepared(InboundCommandPrepared commandPrepared); void addBubbleMessage(CommandMeta meta, Stream<BaseTransactionEvent> events); BubbleCache getBubbleCache(); CommandRepository getCommandRepository(); ApplicationEventPublisher getPublisher(); Map<String, BaseDecoder> getDecoders(); void setDecoders(DecoderRegistry decoders);  }