@Test
  public void testAddSimpleDocumentInContext() {
    final Pool pool = PoolBuilder.aPool().havingDocuments(aDocument().withName("myDoc")).build();
    engineProcessBuilder.casePool(pool);

    final ArgumentCaptor<Expression> argument = ArgumentCaptor.forClass(Expression.class);
    verify(processDefBuilder).addContextEntry(eq("myDoc_ref"), argument.capture());
    assertThat(argument.getValue().getName()).isEqualTo("myDoc");
    assertThat(argument.getValue().getExpressionType())
        .isEqualTo(ExpressionType.TYPE_DOCUMENT.name());
  }
  @Test
  public void testAddBusinessDataAndDocumentInContext() {
    final Pool pool =
        PoolBuilder.aPool()
            .havingData(
                BusinessObjectDataBuilder.aBusinessData()
                    .withName("myBData")
                    .withClassname("my.classname"))
            .havingDocuments(aDocument().withName("myDoc"))
            .build();
    engineProcessBuilder.casePool(pool);

    final ArgumentCaptor<Expression> argument = ArgumentCaptor.forClass(Expression.class);
    verify(processDefBuilder).addContextEntry(eq("myBData_ref"), argument.capture());
    assertThat(argument.getValue().getName()).isEqualTo("myBData");
    assertThat(argument.getValue().getExpressionType())
        .isEqualTo(ExpressionType.TYPE_BUSINESS_DATA_REFERENCE.name());

    final ArgumentCaptor<Expression> argumentDoc = ArgumentCaptor.forClass(Expression.class);
    verify(processDefBuilder).addContextEntry(eq("myDoc_ref"), argumentDoc.capture());
    assertThat(argumentDoc.getValue().getName()).isEqualTo("myDoc");
    assertThat(argumentDoc.getValue().getExpressionType())
        .isEqualTo(ExpressionType.TYPE_DOCUMENT.name());
  }