IBLevel1QuoteProcessor extends IBQuoteProcessor<Level1QuoteData> { protected void processQuote(Ticker ticker, QuoteType quoteType, BigDecimal formattedValue) { Map<QuoteType, BigDecimal> quoteMap = new HashMap<>(); quoteMap.put(quoteType, formattedValue); Level1Quote quote = new Level1Quote(ticker, getTime(), quoteMap); quoteEngine.fireLevel1Quote(quote); } IBLevel1QuoteProcessor(BlockingQueue<Level1QuoteData> queue, IQuoteEngine quoteEngine);   }
@Test public void testProcessQuote() { BlockingQueue<Level1QuoteData> mockQueue = mockery.mock(BlockingQueue.class); final IQuoteEngine mockQuoteEngine = mockery.mock(IQuoteEngine.class); IBLevel1QuoteProcessor processor = new IBLevel1QuoteProcessor(mockQueue, mockQuoteEngine); mockery.checking( new Expectations() {{ one(mockQuoteEngine).fireLevel1Quote( with(any(ILevel1Quote.class ) ) ); } } ); }