Committing design pattern and tests