using less logic in unit test