Removes duplication in tests