Refactored integration tests. Fixed an comparison bug (wrong order of elements in json string).