### Question:
ActivityPropertyReader extends FlowElementPropertyReader { public ScriptTypeListValue getOnExitAction() { return Scripts.onExit(element.getExtensionValues()); } ActivityPropertyReader(Activity activity, BPMNDiagram diagram, DefinitionResolver definitionResolver); ScriptTypeListValue getOnEntryAction(); ScriptTypeListValue getOnExitAction(); SimulationSet getSimulationSet(); AssignmentsInfo getAssignmentsInfo();  }### Answer:
@Test public void testGetOnExitScript() { OnExitScriptType onExitScript = Mockito.mock(OnExitScriptType.class); when(onExitScript.getScript()).thenReturn(SCRIPT); when(onExitScript.getScriptFormat()).thenReturn(JAVA_FORMAT); List<OnExitScriptType> onExitScripts = Collections.singletonList(onExitScript); List<ExtensionAttributeValue> extensions = mockExtensions(DroolsPackage.Literals.DOCUMENT_ROOT__ON_EXIT_SCRIPT, onExitScripts); when(activity.getExtensionValues()).thenReturn(extensions); assertScript(JAVA, SCRIPT, reader.getOnExitAction()); }
@Test public void testGetOnExitScript() { OnExitScriptType onExitScript = Mockito.mock(OnExitScriptType.class); when(onExitScript.getScript()).thenReturn(SCRIPT); when(onExitScript.getScriptFormat()).thenReturn(JAVA_FORMAT); List<OnExitScriptType> onExitScripts = Collections.singletonList(onExitScript); EList<ExtensionAttributeValue> extensions = mockExtensions(DroolsPackage.Literals.DOCUMENT_ROOT__ON_EXIT_SCRIPT, onExitScripts); when(activity.getExtensionValues()).thenReturn(extensions); assertScript(JAVA, SCRIPT, reader.getOnExitAction()); }