Removed duplication in tests