### Question:
JmsPoolJMSContext implements JMSContext, AutoCloseable { @Override public Topic createTopic(String topicName) { try { return getSession().createTopic(topicName); } catch (JMSException jmse) { throw JMSExceptionSupport.createRuntimeException(jmse); } } JmsPoolJMSContext(JmsPoolConnection connection, int sessionMode); private  JmsPoolJMSContext(JmsPoolConnection connection, int sessionMode, AtomicLong connectionRefCount); @Override void start(); @Override void stop(); @Override synchronized void close(); @Override void acknowledge(); @Override void commit(); @Override void rollback(); @Override void recover(); @Override void unsubscribe(String name); @Override BytesMessage createBytesMessage(); @Override MapMessage createMapMessage(); @Override Message createMessage(); @Override ObjectMessage createObjectMessage(); @Override ObjectMessage createObjectMessage(Serializable object); @Override StreamMessage createStreamMessage(); @Override TextMessage createTextMessage(); @Override TextMessage createTextMessage(String text); @Override Queue createQueue(String queueName); @Override Topic createTopic(String topicName); @Override TemporaryQueue createTemporaryQueue(); @Override TemporaryTopic createTemporaryTopic(); @Override synchronized JMSContext createContext(int sessionMode); @Override JMSProducer createProducer(); @Override JMSConsumer createConsumer(Destination destination); @Override JMSConsumer createConsumer(Destination destination, String selector); @Override JMSConsumer createConsumer(Destination destination, String selector, boolean noLocal); @Override JMSConsumer createDurableConsumer(Topic topic, String name); @Override JMSConsumer createDurableConsumer(Topic topic, String name, String selector, boolean noLocal); @Override JMSConsumer createSharedConsumer(Topic topic, String name); @Override JMSConsumer createSharedConsumer(Topic topic, String name, String selector); @Override JMSConsumer createSharedDurableConsumer(Topic topic, String name); @Override JMSConsumer createSharedDurableConsumer(Topic topic, String name, String selector); @Override QueueBrowser createBrowser(Queue queue); @Override QueueBrowser createBrowser(Queue queue, String selector); @Override boolean getAutoStart(); @Override void setAutoStart(boolean autoStart); @Override String getClientID(); @Override void setClientID(String clientID); @Override ExceptionListener getExceptionListener(); @Override void setExceptionListener(ExceptionListener listener); @Override ConnectionMetaData getMetaData(); @Override int getSessionMode(); @Override boolean getTransacted(); @Override String toString(); Connection getConnection();  }### Answer:
@Test(timeout = 30000) public void testCreateTopic() { JMSContext context = cf.createContext(); assertNotNull(context.createTopic(getTestName())); context.close(); try { context.createTopic(getTestName()); fail("Should not be able to create resource when context is closed"); } catch (IllegalStateRuntimeException isre) {} }