@Test
public void testReceiveWhenCommandExistInDb() {

    // Setup
    final InboundCommand command = mock(InboundCommand.class);
    when(mockCommandRepository.save(any(AbstractCommand.class))).thenReturn(command);
    when(command.buildMeta()).thenReturn(mockCommandMeta);
    // Run the test
    commandOrchestratorImplUnderTest.receive(command);
    // Verify the results
    verify(mockCommandRepository).save(same(command));
}