Refactoring to use Mockito in tests. 

Refactored Complainer process to flatten the arrow-code that existed.