Template Method pattern added and tested