Starting junit  tests for input output
Added test for flush() but not working as expected