Adding unit tests for serialize output handler