+ protected static void destroyAfterClass() {
+ TopicEndpointManager.getManager().shutdown();
+ HttpServletServerFactoryInstance.getServerFactory().destroy();
+ HttpClientFactoryInstance.getClientFactory().destroy();
+ }
+
+ /**
+ * Initializes mocks and sets up.
+ */
+ @Override
+ public void setUpBasic() {
+ super.setUpBasic();
+ topicServer = makeServer(serverSink, serverSource);
+ initConfig();
+ }
+
+ public void tearDownBasic() {
+ topicServer.shutdown();
+ }
+
+ /**
+ * Makes a simulator for the given sink and source.
+ *
+ * @param sink topic to which the simulator should publish responses
+ * @param source topic from which the simulator should receive messages
+ * @return a new topic server/simulator
+ */
+ protected abstract TopicServer<Q> makeServer(TopicSink sink, TopicSource source);
+