Tests on container state changing

It could catch error that was fixed in #6954