protected ValueWrapper getResultWrapper(String className,
                                            FactMappingValue expectedResult,
                                            ExpressionEvaluator expressionEvaluator,
                                            Object expectedResultRaw,
                                            Object resultRaw,
                                            Class<?> resultClass) {
        try {
            ExpressionEvaluatorResult evaluationResult = expressionEvaluator.evaluateUnaryExpression((String) expectedResultRaw,
                                                                                                     resultRaw,
                                                                                                     resultClass);
            if (evaluationResult.isSuccessful()) {
                return of(resultRaw);
            } else if (isCollectionOrMap(className)) {
                return errorWithCollectionPathToValue(evaluationResult.getWrongValue(), evaluationResult.getPathToWrongValue());
            } else {
                return errorWithValidValue(resultRaw, expectedResultRaw);
            }
        } catch (Exception e) {
            expectedResult.setExceptionMessage(e.getMessage());
            return errorWithMessage(e.getMessage());
        }
    }
@Test
    public void getResultWrapper() {
        ExpressionEvaluator expressionEvaluatorMock = mock(ExpressionEvaluator.class);
        Object resultRaw = "test";
        Object expectedResultRaw = "";
        String collectionWrongValue = "value";
        String collectionValuePath = "Item #: 1";
        String genericErrorMessage = "errorMessage";

        // case 1: succeed
        when(expressionEvaluatorMock.evaluateUnaryExpression(any(), any(), any(Class.class))).thenReturn(ExpressionEvaluatorResult.ofSuccessful());
        ValueWrapper<Object> valueWrapper = abstractRunnerHelper.getResultWrapper(String.class.getCanonicalName(), new FactMappingValue(), expressionEvaluatorMock, expectedResultRaw, resultRaw, String.class);
        assertThat(valueWrapper.isValid()).isTrue();
        assertThat(valueWrapper.getCollectionPathToValue()).isNull();

        // case 2: failed with actual value
        when(expressionEvaluatorMock.evaluateUnaryExpression(any(), any(), any(Class.class))).thenReturn(ExpressionEvaluatorResult.ofFailed());
        valueWrapper = abstractRunnerHelper.getResultWrapper(String.class.getCanonicalName(), new FactMappingValue(), expressionEvaluatorMock, expectedResultRaw, resultRaw, String.class);
        assertThat(valueWrapper.isValid()).isFalse();
        assertThat(valueWrapper.getValue()).isEqualTo(resultRaw);
        assertThat(valueWrapper.getCollectionPathToValue()).isNull();

        // case 3: failed without actual value (list)
        valueWrapper = abstractRunnerHelper.getResultWrapper(List.class.getCanonicalName(), new FactMappingValue(), expressionEvaluatorMock, expectedResultRaw, resultRaw, List.class);
        assertThat(valueWrapper.getErrorMessage()).isNotPresent();
        assertThat(valueWrapper.getCollectionPathToValue()).isEmpty();
        assertThat(valueWrapper.getValue()).isNull();

        // case 4: failed without actual value (map)
        valueWrapper = abstractRunnerHelper.getResultWrapper(Map.class.getCanonicalName(), new FactMappingValue(), expressionEvaluatorMock, expectedResultRaw, resultRaw, Map.class);
        assertThat(valueWrapper.getErrorMessage()).isNotPresent();
        assertThat(valueWrapper.getCollectionPathToValue()).isEmpty();
        assertThat(valueWrapper.getValue()).isNull();

        // case 5: failed with wrong value (list)
        ExpressionEvaluatorResult result = ExpressionEvaluatorResult.ofFailed(collectionWrongValue, collectionValuePath);
        when(expressionEvaluatorMock.evaluateUnaryExpression(any(), any(), any(Class.class))).thenReturn(result);
        valueWrapper = abstractRunnerHelper.getResultWrapper(List.class.getCanonicalName(), new FactMappingValue(), expressionEvaluatorMock, expectedResultRaw, resultRaw, List.class);
        assertThat(valueWrapper.getErrorMessage()).isNotPresent();
        assertThat(valueWrapper.getCollectionPathToValue()).hasSize(1);
        assertThat(valueWrapper.getValue()).isEqualTo(collectionWrongValue);

        // case 6: failed without actual value (map)
        valueWrapper = abstractRunnerHelper.getResultWrapper(Map.class.getCanonicalName(), new FactMappingValue(), expressionEvaluatorMock, expectedResultRaw, resultRaw, Map.class);
        assertThat(valueWrapper.getErrorMessage()).isNotPresent();
        assertThat(valueWrapper.getCollectionPathToValue()).hasSize(1);
        assertThat(valueWrapper.getValue()).isEqualTo(collectionWrongValue);

        // case 7: failed without wrong value (list)
        result = ExpressionEvaluatorResult.ofFailed(null, collectionValuePath);
        when(expressionEvaluatorMock.evaluateUnaryExpression(any(), any(), any(Class.class))).thenReturn(result);
        valueWrapper = abstractRunnerHelper.getResultWrapper(List.class.getCanonicalName(), new FactMappingValue(), expressionEvaluatorMock, expectedResultRaw, resultRaw, List.class);
        assertThat(valueWrapper.getErrorMessage()).isNotPresent();
        assertThat(valueWrapper.getCollectionPathToValue()).hasSize(1);
        assertThat(valueWrapper.getValue()).isNull();

        // case 8: failed without actual value (map)
        valueWrapper = abstractRunnerHelper.getResultWrapper(Map.class.getCanonicalName(), new FactMappingValue(), expressionEvaluatorMock, expectedResultRaw, resultRaw, Map.class);
        assertThat(valueWrapper.getErrorMessage()).isNotPresent();
        assertThat(valueWrapper.getCollectionPathToValue()).hasSize(1);
        assertThat(valueWrapper.getValue()).isNull();

        // case 9: failed with generic exception
        when(expressionEvaluatorMock.evaluateUnaryExpression(any(), any(), any(Class.class))).thenThrow(new IllegalArgumentException(genericErrorMessage));
        FactMappingValue expectedResult5 = new FactMappingValue();
        valueWrapper = abstractRunnerHelper.getResultWrapper(Map.class.getCanonicalName(), expectedResult5, expressionEvaluatorMock, expectedResultRaw, resultRaw, Map.class);
        assertThat(valueWrapper.getErrorMessage().get()).isEqualTo(genericErrorMessage);
        assertThat(expectedResult5.getExceptionMessage()).isEqualTo(genericErrorMessage);
    }