func assertStateIsClosed(c *gc.C, st *state.State) { c.Assert(func() { st.Ping() }, gc.PanicMatches, "Session already closed") }
func assertStateNotClosed(c *gc.C, st *state.State) { err := st.Ping() c.Assert(err, jc.ErrorIsNil) }
func assertStateIsOpen(c *gc.C, st *state.State) { c.Assert(st.Ping(), jc.ErrorIsNil) }