Basically all tests are rewritten here. Implementation details should
not be checked because tests are becoming fragile when it comes to any
refactoring.
What instead should be tested is the actual **public behavior** of the
library when using its public interfaces.
While doing all these changes the following assumptions about this codebase
have been made:
- class fields which are prefixed with underscore (like `observer._onNext`)
are intended to be private and thus should only be accessed by members of
the same class or its subclasses
- `observer.stopped` is a public **readonly** field and should never be
modified by the outside world, because its role is considered to be
purely informational
If the above assumptions are not correct, this will need to be discussed
further. These improvements of the tests are necessary to introduce any
changes which include refactoring of the `Observer` in order to fix some
bugs.