TaskReducer & unit test for TaskReducer