       (let [nimbus (Mockito/spy (Nimbus. conf nil mock-state nil mock-blob-store nil nil))]
         (.set (.getHeartbeatsCache nimbus) hb-cache)
         (.thenReturn (Mockito/when (.storedTopoIds mock-blob-store)) (HashSet. inactive-topos))
-        (mocking
-          [teardown-heartbeats
-           teardown-topo-errors]
 
           (.doCleanup nimbus)
 
           ;; removed heartbeats znode
-          (verify-nth-call-args-for 1 teardown-heartbeats "topo2")
-          (verify-nth-call-args-for 2 teardown-heartbeats "topo3")
+          (.teardownHeartbeats (Mockito/verify mock-state) "topo2")
+          (.teardownHeartbeats (Mockito/verify mock-state) "topo3")
 
           ;; removed topo errors znode
-          (verify-nth-call-args-for 1 teardown-topo-errors "topo2")
-          (verify-nth-call-args-for 2 teardown-topo-errors "topo3")
+          (.teardownTopologyErrors (Mockito/verify mock-state) "topo2")
+          (.teardownTopologyErrors (Mockito/verify mock-state) "topo3")
 
           ;; removed topo directories
           (.forceDeleteTopoDistDir (Mockito/verify nimbus) "topo2")

        (.setLogConfig nimbus "foo" mock-config)
        (.setTopologyLogConfig (Mockito/verify cluster-state) (Mockito/any String) (Mockito/eq expected-config) (Mockito/any Map))))))

(defn teardown-heartbeats [id])
(defn teardown-topo-errors [id])
(defn teardown-backpressure-dirs [id])
(defn teardown-wt-dirs [id])

(defn mock-cluster-state
  ([]
    (mock-cluster-state nil nil))

          (.rmDependencyJarsInTopology (Mockito/verify nimbus) "topo3")

          ;; remove topos from heartbeat cache
          (is (= (count (.get (.getHeartbeatsCache nimbus))) 0))))))


(deftest do-cleanup-does-not-teardown-active-topos
