Fix non-deterministic unit test

- the latch was before onError is called
- use BlockingObservable and expect the IllegalArgumentException to be thrown
Merge pull request #473 from benjchristensen/fix-nondeterministic-unit-test

Fix non-deterministic unit test