moved WriteTest into its own package