Adding tests
[BZ-995062] add pattern to WindowDeclaration serialization
(cherry picked from commit 94873fc843b28b36a7003320ecd240cafe2ca064)