@Test
public void shouldProperlyCastMessageIntoServer() throws Exception {

  when(mockMessage.getServer()).thenReturn(mockServerProtocol);
  ServerProtocol serverProtocol = serverMessageValidator.cast(mockMessage);
  assertThat(serverProtocol).isNotNull();
  assertThat(serverProtocol).isInstanceOf(ServerProtocol.class);
  verify(mockMessage, times(1)).getServer();
  verifyNoMoreInteractions(mockMessage);
}