Search in sources :

Example 1 with MessageProducer

use of com.ctrip.framework.apollo.tracer.spi.MessageProducer in project apollo by ctripcorp.

the class BaseIntegrationTest method setUp.

@Before
public void setUp() throws Exception {
    MessageProducer someProducer = mock(MessageProducer.class);
    MockMessageProducerManager.setProducer(someProducer);
    Transaction someTransaction = mock(Transaction.class);
    when(someProducer.newTransaction(anyString(), anyString())).thenReturn(someTransaction);
}
Also used : Transaction(com.ctrip.framework.apollo.tracer.spi.Transaction) MessageProducer(com.ctrip.framework.apollo.tracer.spi.MessageProducer) Before(org.junit.Before)

Aggregations

MessageProducer (com.ctrip.framework.apollo.tracer.spi.MessageProducer)1 Transaction (com.ctrip.framework.apollo.tracer.spi.Transaction)1 Before (org.junit.Before)1