added tests for folding
Merge pull request #603 from georgebyelas/master

added tests for folding ( follow instruction issue #602 incorrect folding, now called collapse bug)