Minor refactoring in test-example