testcase for sideeffects problems