tests: fully rewrited