### Question:
EmbeddedJmsRuleImpl implements EmbeddedJmsRule { @Override public ActiveMQConnectionFactory activeMqConnectionFactory() { if (jmsBrokerHolder == null) { throw new IllegalStateException("Can not create ConnectionFactory before the broker has started"); } else { return jmsBrokerHolder.getActiveMQConnectionFactory(); } } EmbeddedJmsRuleImpl(final String predefinedName, final boolean marshal, final boolean persistent); @Override ConnectionFactory connectionFactory(); @Override ActiveMQConnectionFactory activeMqConnectionFactory(); @Override URI brokerUri(); @Override Statement apply(final Statement base, final Description description);  }### Answer:
@Test(expected = IllegalStateException.class) public void activeMqConnectionFactory() throws Exception { final EmbeddedJmsRuleImpl rule = new EmbeddedJmsRuleImpl("predefined", true, false); rule.activeMqConnectionFactory(); }