Common test template
Test refactored to remove duplicities