Incoporate review suggestions.

Splits a compound unit test into to parts.
Uses mockito instead of a bespoke test object.
Removes unused import statements.
Changes the order of the Finally action w.r.t. onComplete/onError.