refactoring invoice tests