### Question:
AdHocSubProcessPropertyWriter extends SubProcessPropertyWriter { public void setAdHocActivationCondition(BaseAdHocActivationCondition adHocActivationCondition) { if (StringUtils.nonEmpty(adHocActivationCondition.getValue())) { CustomElement.customActivationCondition.of(flowElement).set(adHocActivationCondition.getValue()); } } AdHocSubProcessPropertyWriter(AdHocSubProcess process, VariableScope variableScope, Set<DataObject> dataObjects); void setAdHocActivationCondition(BaseAdHocActivationCondition adHocActivationCondition); void setAdHocOrdering(org.kie.workbench.common.stunner.bpmn.definition.property.task.AdHocOrdering value); void setAdHocCompletionCondition(BaseAdHocCompletionCondition adHocCompletionCondition); void setAdHocAutostart(boolean autoStart);  }### Answer:
@Test public void testSetAdHocActivationCondition() { tested.setAdHocActivationCondition(new AdHocActivationCondition("condition expression")); assertEquals(asCData("condition expression"), CustomElement.customActivationCondition.of(tested.getFlowElement()).get()); }
@Test public void testSetAdHocActivationConditionNull() { tested.setAdHocActivationCondition(new AdHocActivationCondition(null)); assertEquals("", CustomElement.customActivationCondition.of(tested.getFlowElement()).get()); }
@Test public void testSetAdHocActivationConditionEmpty() { tested.setAdHocActivationCondition(new AdHocActivationCondition("")); assertEquals("", CustomElement.customActivationCondition.of(tested.getFlowElement()).get()); }