Stream save method and unit test is added