Refactor existing tests