Try to program against Interfaces, not implementations. So use RouterInterface instead of Router (same for other arguments if possible)