compacted code of unit tests a bit
tests refactoring: eliminated duplicate code, added more future state checks