Deriving protocol for tests