@Test
public void testCreateCommandWhenInboundCommandExist() {

    // Setup
    final TransporterCommand command = mock(TransporterCommand.class);
    when(mockCommandOrchestrator.isInboundCommandExist(command.getRefId())).thenReturn(true);
    // Run the test
    final ResponseEntity<?> result = commandControllerUnderTest.createCommand(command);
    // Verify the results
    assertEquals(result.getStatusCode(), HttpStatus.CONFLICT);
    verify(mockCommandOrchestrator, never()).receive(any(InboundCommand.class));
}