private static String getPipelineJson() throws Exception {
   URI uri = Resources.getResource("kafka_destination_pipeline_operations.json").toURI();
   String pipelineJson = new String(Files.readAllBytes(Paths.get(uri)), StandardCharsets.UTF_8);
   pipelineJson = pipelineJson.replace("topicName", TOPIC);
   pipelineJson = pipelineJson.replaceAll("localhost:9092", KafkaTestUtil.getMetadataBrokerURI());
   pipelineJson =
       pipelineJson.replaceAll("localhost:2181", KafkaTestUtil.getZkServer().connectString());
   return pipelineJson;
 }
 @Before
 @Override
 public void setUp() throws Exception {
   super.setUp();
   KafkaTestUtil.startZookeeper();
   KafkaTestUtil.startKafkaBrokers(3);
   KafkaTestUtil.createTopic(TOPIC, 3, 2);
   kafkaStreams =
       KafkaTestUtil.createKafkaStream(KafkaTestUtil.getZkServer().connectString(), TOPIC, 3);
 }
 @BeforeClass
 public static void beforeClass() throws Exception {
   KafkaTestUtil.startZookeeper();
   KafkaTestUtil.startKafkaBrokers(1);
   KafkaTestUtil.createTopic(TOPIC, 1, 1);
   System.setProperty("sdc.testing-mode", "true");
   miniSDCTestingUtility = new MiniSDCTestingUtility();
   miniSDC = miniSDCTestingUtility.createMiniSDC(MiniSDC.ExecutionMode.STANDALONE);
   miniSDC.startSDC();
   serverURI = miniSDC.getServerURI();
   miniSDC.createPipeline(getPipelineJson());
   ruleDefinitions =
       miniSDC.createRules(getPipelineName(), getPipelineRev(), getRuleDefinitions());
 }
 @AfterClass
 public static void afterClass() throws Exception {
   KafkaTestUtil.shutdown();
   miniSDCTestingUtility.stopMiniSDC();
 }
 @After
 @Override
 public void tearDown() {
   KafkaTestUtil.shutdown();
 }