### Question:
MultipleInstanceActivityPropertyWriter extends ActivityPropertyWriter { public void setCompletionCondition(String expression) { if (!isEmpty(expression)) { setUpLoopCharacteristics(); FormalExpression formalExpression = bpmn2.createFormalExpression(); formalExpression.setBody(asCData(expression)); miloop.setCompletionCondition(formalExpression); } } MultipleInstanceActivityPropertyWriter(Activity activity,
                                                  VariableScope variableScope,
                                                  Set<DataObject> dataObjects); void setCollectionInput(String collectionInput); void setCollectionOutput(String collectionOutput); void setInput(String name); void setOutput(String name); void setOutput(String name, boolean addDataOutputAssociation); void setCompletionCondition(String expression); void setIsSequential(boolean sequential);  }### Answer:
@Test public void testSetCompletionCondition() { writer.setCompletionCondition(COMPLETION_CONDITION); assertEquals("<![CDATA[COMPLETION_CONDITION]]>", ((FormalExpression) ((MultiInstanceLoopCharacteristics) activity.getLoopCharacteristics()).getCompletionCondition()).getBody()); }