Using Mockito functionality: if you inject your controller with a mock FilterDataProvider (which is the standard approach, using for example MockitoJUnitRunner and @InjectMocks) , then you can use Mockito's "verity" option to make sure it got the correct endDate. See discussion: http://www.vogella.com/tutorials/Mockito/article.html#mockito_verify
Obviously, there are other approaches that rely on logic rather than technicalities. For example: refactoring the "if" part to a separateMethod "correctEndDate", or populating your data so that a different list of coutries is returned based on the endDate.