added test case for reduce operator