### Question:
TransactionalMessageServiceImpl implements TransactionalMessageService { @Override public boolean deletePrepareMessage(MessageExt msgExt) { if (this.transactionalMessageBridge.putOpMessage(msgExt, TransactionalMessageUtil.REMOVETAG)) { log.info("Transaction op message write successfully. messageId={}, queueId={} msgExt:{}", msgExt.getMsgId(), msgExt.getQueueId(), msgExt); return true; } else { log.error("Transaction op message write failed. messageId is {}, queueId is {}", msgExt.getMsgId(), msgExt.getQueueId()); return false; } } TransactionalMessageServiceImpl(TransactionalMessageBridge transactionBridge); @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();  }### Answer:
@Test public void testDeletePrepareMessage() { when(bridge.putOpMessage(any(MessageExt.class), anyString())).thenReturn(true); boolean res = queueTransactionMsgService.deletePrepareMessage(createMessageBrokerInner()); assertThat(res).isTrue(); }