Added testcase regarding to #581
Merge branch 'trunk' of https://github.com/impetus-opensource/Kundera into trunk