Thoughtworks Interview Question

adding features and unit tests to an existing fragment of code