Refactor testu pro WriteService naradi