refactored invoicing tests with setup