@Test public void testPrepareMessage() { MessageExtBrokerInner inner = createMessageBrokerInner(); when(bridge.putHalfMessage(any(MessageExtBrokerInner.class))).thenReturn(new PutMessageResult (PutMessageStatus.PUT_OK, new AppendMessageResult(AppendMessageStatus.PUT_OK))); PutMessageResult result = queueTransactionMsgService.prepareMessage(inner); assert result.isOk(); }
@Override public PutMessageResult prepareMessage(MessageExtBrokerInner messageInner) { return transactionalMessageBridge.putHalfMessage(messageInner); }
TransactionalMessageServiceImpl implements TransactionalMessageService { @Override public PutMessageResult prepareMessage(MessageExtBrokerInner messageInner) { return transactionalMessageBridge.putHalfMessage(messageInner); } }
TransactionalMessageServiceImpl implements TransactionalMessageService { @Override public PutMessageResult prepareMessage(MessageExtBrokerInner messageInner) { return transactionalMessageBridge.putHalfMessage(messageInner); } TransactionalMessageServiceImpl(TransactionalMessageBridge transactionBridge); }
TransactionalMessageServiceImpl implements TransactionalMessageService { @Override public PutMessageResult prepareMessage(MessageExtBrokerInner messageInner) { return transactionalMessageBridge.putHalfMessage(messageInner); } TransactionalMessageServiceImpl(TransactionalMessageBridge transactionBridge); @Override CompletableFuture<PutMessageResult> asyncPrepareMessage(MessageExtBrokerInner messageInner); @Override PutMessageResult prepareMessage(MessageExtBrokerInner messageInner); @Override void check(long transactionTimeout, int transactionCheckMax,
        AbstractTransactionalMessageCheckListener listener); @Override boolean deletePrepareMessage(MessageExt msgExt); @Override OperationResult commitMessage(EndTransactionRequestHeader requestHeader); @Override OperationResult rollbackMessage(EndTransactionRequestHeader requestHeader); @Override boolean open(); @Override void close(); }
TransactionalMessageServiceImpl implements TransactionalMessageService { @Override public PutMessageResult prepareMessage(MessageExtBrokerInner messageInner) { return transactionalMessageBridge.putHalfMessage(messageInner); } TransactionalMessageServiceImpl(TransactionalMessageBridge transactionBridge); @Override CompletableFuture<PutMessageResult> asyncPrepareMessage(MessageExtBrokerInner messageInner); @Override PutMessageResult prepareMessage(MessageExtBrokerInner messageInner); @Override void check(long transactionTimeout, int transactionCheckMax,
        AbstractTransactionalMessageCheckListener listener); @Override boolean deletePrepareMessage(MessageExt msgExt); @Override OperationResult commitMessage(EndTransactionRequestHeader requestHeader); @Override OperationResult rollbackMessage(EndTransactionRequestHeader requestHeader); @Override boolean open(); @Override void close();  }