assertEquals("Transition", Transitions.Stopped, flow.getState().get());  assertTrue("Flow should be stopped but is: " + flow.getState().get(), flow.isStopped()); assertTrue("Flow should have failed", flow.isFailed());
assertFlowFailed(flow);
    public void testFlowTimesOutAndFails() throws Exception {        Thread.sleep(timeout  * 4);                assertEquals("Transition", Transitions.Stopped, flow.getState().get());                assertTrue("Flow should be stopped but is: " + flow.getState().get(), flow.isStopped());        assertTrue("Flow should have failed", flow.isFailed());            }