[blivet 02/13] Factor state testing behavior into a separate class.