rework the tests to use the stream recorder
rework test to compare the records as a line string

Signed-off-by: Ioannis Tziakos <ioannist@enthought.com>