@Test
public void testFailure() throws JMSException, Exception{
JmsSpout spout = new JmsSpout();
JmsProvider mockProvider = new MockJmsProvider();
MockSpoutOutputCollector mockCollector = new MockSpoutOutputCollector();
SpoutOutputCollector collector = new SpoutOutputCollector(mockCollector);
spout.setJmsProvider(new MockJmsProvider());
spout.setJmsTupleProducer(new MockTupleProducer());
spout.setJmsAcknowledgeMode(Session.CLIENT_ACKNOWLEDGE);
spout.setRecoveryPeriod(10); // Rapid recovery for testing.
spout.open(new HashMap<String,String>(), null, collector);