Re: The best way to unit test a Bolt with dependency?

2016-02-09 Thread Spico Florin
Hello! Set RabbitMQUtils as transient field in order to get rid of serialization error. See if you can mock (Mockito using) your RabbitMQ utils and inject it via setMQ. Hope that these help. Regards, Florin On Tue, Jan 19, 2016 at 7:16 PM, Noppanit Charassinvichai < noppani...@gmail.com>

The best way to unit test a Bolt with dependency?

2016-01-19 Thread Noppanit Charassinvichai
I'm trying to unit test my Bolt which has dependency to RabbitMQ. This is what I put in my prepare method. @Override public void prepare(Map map, TopologyContext topologyContext, OutputCollector outputCollector) { this.outputCollector = outputCollector; this.gson = new