@Test
public void testIsInboundCommandWithStatusExistWhenCommandInDB() {

    // Setup
    final String refId = "123";
    final InboundCommand.Status status = InboundCommand.Status.STARTED;
    final InboundCommand command = mock(InboundCommand.class);
    when(mockCommandRepository.findByIdAndStatus(refId, status)).thenReturn(Optional.of(command));
    // Run the test
    final boolean result = commandOrchestratorImplUnderTest.isInboundCommandWithStatusExist(refId, status);
    // Verify the results
    assertEquals(true, result);
}