### Question:
BoundaryEventPropertyWriter extends CatchEventPropertyWriter { public void setParentActivity(ActivityPropertyWriter parent) { event.setAttachedToRef(parent.getFlowElement()); } BoundaryEventPropertyWriter(BoundaryEvent event, VariableScope variableScope, Set<DataObject> dataObjects); @Override void setCancelActivity(Boolean value); void setParentActivity(ActivityPropertyWriter parent); @Override void addEventDefinition(EventDefinition eventDefinition); @Override void setAbsoluteBounds(Node<? extends View, ?> node);  }### Answer:
@Test public void testSetParentActivity() { ActivityPropertyWriter parentActivityWriter = mock(ActivityPropertyWriter.class); Activity activity = mock(Activity.class); when(parentActivityWriter.getFlowElement()).thenReturn(activity); propertyWriter.setParentActivity(parentActivityWriter); verify(element).setAttachedToRef(activity); }