code: func (t *MockSocket) WriteMessage(messageType int, message []byte) error {
  	select {
  	case expectedMessage := <-t.expectedRequests:
  		if asCanonicalString(expectedMessage.sentMessage) == asCanonicalString(message) {
  			// Transfer the response into the received messages channel
  			for _, response := range expectedMessage.responses {
  				t.receivedMessages <- response
  			}
  		} else {
  			fmt.Println("Unexpected response", asCanonicalString(message))
  			fmt.Println("Expected ", string(expectedMessage.sentMessage))
  		}
  	default:
  		fmt.Println("No more responses registered, expecting", string(message))
  	}
  
  	return nil
  }
docs: // WriteMessage implements the Socket interface