refactoring layout unit tests