@polesye Rewrote tests to reuse repeating function.