small test DRY refactoring