Rep 1087 functional test with Marek's commits