@Test
public void testCommandMapper() throws JsonProcessingException {

    // Setup
    final BaseTransactionCommand baseTransactionCommand = mock(BaseTransactionCommand.class);
    final BubbleMessage bubbleMessage = mock(BubbleMessage.class);
    final String payload= "somepayload";
    when(mockBubbleCache.getBubble(baseTransactionCommand.getId())).thenReturn(Optional.of(bubbleMessage));
    when(mockMapper.writeValueAsString(baseTransactionCommand.getPayload())).thenReturn(payload);
    // Run the test
    final OutboundCommand result = commandOrchestratorImplUnderTest.commandMapper(baseTransactionCommand);
    // Verify the results
    assertEquals(payload, result.getPayload());
}