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 Gson();
        this.rabbitMQUtils = new RabbitMQUtils(this.config);
    }

If I change that to inject RabbitMQUtils I get an Exception telling me that
some classes in RabbitMQ API cannot be serialized.

What do people do to unit test something like this?

Thanks.

Reply via email to