Tests was refactored. Some new 'unbhappy-path' tests were added.