SimpleEngine { public static void submitTopology(Topology topology) { SimpleTopology simpleTopology = (SimpleTopology) topology; simpleTopology.run(); }  static void submitTopology(Topology topology);  }
@Test public void testSubmitTopology() { new NonStrictExpectations() { { Runtime.getRuntime(); result=mockedRuntime; mockedRuntime.exit(0); } }; SimpleEngine.submitTopology(topology); new Verifications() { { topology.run(); } }; }