[test] Refactoring tests