new scenarios for SAM upgrades, github issues 302 and 303
refactored, added new tests
Merge remote-tracking branch 'upstream/master'
Merge pull request #308 from hhovsepy/master

refactored, added new tests
Merge remote-tracking branch 'upstream/master'