Testing Reducer
This lesson demonstrates how to write a unit test case for a reducer.
We'll cover the following
Testing Reducer
We can write a unit test case for our reducer class CarReducer
like how we wrote a unit test case for our mapper class. The code below is self-explanatory. The input to the mapper class is specified through the method withInput(...)
and the expected output via the method withOutput(...)
.
Get hands-on with 1400+ tech skills courses.