@Test
public void getResultWrapper() {

    ExpressionEvaluator expressionEvaluatorMock = mock(ExpressionEvaluator.class);
    Object resultRaw = "test";
    Object expectedResultRaw = "";
    String collectionError = "Impossible to find elements in the collection to satisfy the conditions";
    String genericErrorMessage = "errorMessage";
    // case 1: succeed
    when(expressionEvaluatorMock.evaluateUnaryExpression(any(), any(), any(Class.class))).thenReturn(true);
    ValueWrapper valueWrapper = abstractRunnerHelper.getResultWrapper(String.class.getCanonicalName(), new FactMappingValue(), expressionEvaluatorMock, expectedResultRaw, resultRaw, String.class);
    assertTrue(valueWrapper.isValid());
    // case 2: failed with actual value
    when(expressionEvaluatorMock.evaluateUnaryExpression(any(), any(), any(Class.class))).thenReturn(false);
    valueWrapper = abstractRunnerHelper.getResultWrapper(String.class.getCanonicalName(), new FactMappingValue(), expressionEvaluatorMock, expectedResultRaw, resultRaw, String.class);
    assertFalse(valueWrapper.isValid());
    assertEquals(resultRaw, valueWrapper.getValue());
    // case 3: failed without actual value (list)
    valueWrapper = abstractRunnerHelper.getResultWrapper(List.class.getCanonicalName(), new FactMappingValue(), expressionEvaluatorMock, expectedResultRaw, resultRaw, List.class);
    assertEquals(collectionError, valueWrapper.getErrorMessage().get());
    // case 4: failed without actual value (map)
    valueWrapper = abstractRunnerHelper.getResultWrapper(Map.class.getCanonicalName(), new FactMappingValue(), expressionEvaluatorMock, expectedResultRaw, resultRaw, Map.class);
    assertEquals(collectionError, valueWrapper.getErrorMessage().get());
    // case 5: 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);
    assertEquals(genericErrorMessage, valueWrapper.getErrorMessage().get());
    assertEquals(genericErrorMessage, expectedResult5.getExceptionMessage());
}