Fixing deprecations in unittests
Dropping dependency to dunit. Cleaning unittests from useless or too
verbose ones. Fixing InvalidMemoryOperation while terminating unittests.