Refactored writethrough test.  Doing so so that when add a new test for write through test using error code, can reuse test code.