@VisibleForTesting
  int getReturnCode() {

    int successCode = CommandExecutorCodes.Kitchen.SUCCESS.getCode();

    if ( getResult().getNrErrors() != 0 ) {
      getLog().logError( BaseMessages.getString( getPkgClazz(), "Kitchen.Error.FinishedWithErrors" ) );
      return CommandExecutorCodes.Kitchen.ERRORS_DURING_PROCESSING.getCode();
    }

    return getResult().getResult() ? successCode : CommandExecutorCodes.Kitchen.ERRORS_DURING_PROCESSING.getCode();

  }
@Test
  public void testReturnCodeFailWithNoErrors() {
    when( mockedKitchenCommandExecutor.getResult() ).thenReturn( result );
    assertEquals( mockedKitchenCommandExecutor.getReturnCode(), CommandExecutorCodes.Kitchen.ERRORS_DURING_PROCESSING.getCode() );
  }