KAA-278: encode of server sink + tests