Added test code for chain of responsibility