@Test
public void testRestartInboundCommand() {

    // Setup
    final String commandId = "commandId";
    final InboundCommand command = mock(InboundCommand.class);
    when(mockCommandRepository.findOneOpt(commandId)).thenReturn(Optional.of(command));
    // Run the test
    final ResponseEntity<?> result = commandControllerUnderTest.restartCommand(commandId);
    // Verify the results
    assertEquals(result.getStatusCode(), HttpStatus.ACCEPTED);
    verify(mockCommandOrchestrator).receive(any(InboundCommand.class));
}