### Question:
CaseManagementCallActivityConverter extends BaseCallActivityConverter<ReusableSubprocess, BaseReusableSubprocessTaskExecutionSet> { @Override protected Node<View<ReusableSubprocess>, Edge> createNode(CallActivity activity, CallActivityPropertyReader p) { Class<? extends ReusableSubprocess> clazz = p.isCase() ? CaseReusableSubprocess.class : ProcessReusableSubprocess.class; return factoryManager.newNode(activity.getId(), clazz); } CaseManagementCallActivityConverter(TypedFactoryManager factoryManager,
                                               PropertyReaderFactory propertyReaderFactory);   }### Answer:
@Test public void testCreateNode_case() { String uuid = UUID.randomUUID().toString(); CallActivity callActivity = bpmn2.createCallActivity(); callActivity.setId(uuid); CustomElement.isCase.of(callActivity).set(Boolean.TRUE); CallActivityPropertyReader propertyReader = new CallActivityPropertyReader(callActivity, definitionResolver.getDiagram(), definitionResolver); tested.createNode(callActivity, propertyReader); verify(factoryManager).newElement(eq(uuid), eq(getDefinitionId(CaseReusableSubprocess.class))); }
@Test public void testCreateNode_process() { String uuid = UUID.randomUUID().toString(); CallActivity callActivity = bpmn2.createCallActivity(); callActivity.setId(uuid); CustomElement.isCase.of(callActivity).set(Boolean.FALSE); CallActivityPropertyReader propertyReader = new CallActivityPropertyReader(callActivity, definitionResolver.getDiagram(), definitionResolver); tested.createNode(callActivity, propertyReader); verify(factoryManager).newElement(eq(uuid), eq(getDefinitionId(ProcessReusableSubprocess.class))); }