native testing refactoring