Added write tests.