Added the ability to complete a task.
Add passing test to complete task.

Extract method to complete task.

Extracted complete task to a method.

Formatting fix.