Fixed tests after refactoring. Unit tests for Protocol were replaced by complex tests.