Unit tests

fix: cided input/streams, ringbuffer, merge unknown fields