Testing switch functionality