Add test
#462 Improve case-when-then serialization