@Test
public void testIsInboundCommandExistWhenCommandInDB() {

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