refactoring uart io write test case, two cases left.
uart io write test cases refactored. allocate test object on stack.