chain of responsibility pattern impl with mocking