@Test
public void shouldProperlyDeserializeJsonString() throws Exception {

  String someJson = "any value";
  Message mockMessage = mock(Message.class);
  when(jsonSerializer.fromJson(someJson, Message.class)).thenReturn(mockMessage);
  Message message = messageJsonMapper.transformMessage(someJson);
  assertThat(message).isNotNull();
  assertThat(message).isInstanceOf(Message.class);
  verify(jsonSerializer, times(1)).fromJson(someJson, Message.class);
}