@Test
public void testCreateConsumerFails() throws Exception {

  when(session.createConsumer(any(Destination.class), anyString()))
    .thenThrow(new JMSException(""));
  try {
    create();
    fail("Expected exception: org.apache.flume.FlumeException");
  } catch (FlumeException e) {
    verify(session).close();
    verify(connection).close();
  }
}