<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Nested CallActivity Mockito Serialization Problem in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/nested-callactivity-mockito-serialization-problem/m-p/137228#M96211</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've got a hard time following you're explanation, but from the stacktrace it seems that the mocked object is not serializable, but the object is used as a process variable, thence the need for it to be serialized.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Dec 2012 17:31:39 GMT</pubDate>
    <dc:creator>jbarrez</dc:creator>
    <dc:date>2012-12-18T17:31:39Z</dc:date>
    <item>
      <title>Nested CallActivity Mockito Serialization Problem</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/nested-callactivity-mockito-serialization-problem/m-p/137227#M96210</link>
      <description>Hi,You can find the test project here: https://docs.google.com/open?id=0B53lOHnXR0yJVHlqS3lRajhqUXcI have 3 bpmn process. Level1 calls Level2 and Level2 calls Level3. Level3 has only one service task which uses an expression.I pass a spring managed bean from L1 to L2 and then L2 to L3. It works when</description>
      <pubDate>Wed, 12 Dec 2012 12:41:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/nested-callactivity-mockito-serialization-problem/m-p/137227#M96210</guid>
      <dc:creator>gokceng1</dc:creator>
      <dc:date>2012-12-12T12:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: Nested CallActivity Mockito Serialization Problem</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/nested-callactivity-mockito-serialization-problem/m-p/137228#M96211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've got a hard time following you're explanation, but from the stacktrace it seems that the mocked object is not serializable, but the object is used as a process variable, thence the need for it to be serialized.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2012 17:31:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/nested-callactivity-mockito-serialization-problem/m-p/137228#M96211</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2012-12-18T17:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: Nested CallActivity Mockito Serialization Problem</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/nested-callactivity-mockito-serialization-problem/m-p/137229#M96212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sorry for complexity of situation, I try to make it simple here.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have one object which is &lt;/SPAN&gt;&lt;EM&gt;dummyService&lt;/EM&gt;&lt;SPAN&gt; used in process as a process variable. DummyService class implements Serializable so using it as a Spring bean there is no problem. My problem is that:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Initializing &lt;/SPAN&gt;&lt;EM&gt;dummyService&lt;/EM&gt;&lt;SPAN&gt; as a Mock using Mockito like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;CODE&gt;dummyService = Mockito.mock(DummyService.class, Mockito.withSettings().serializable());&lt;BR /&gt; Mockito.when(dummyService.dummyMethod("Level 3 Service Task")).thenCallRealMethod();&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt; OR&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;CODE&gt;dummyService = Mockito.mock(DummyService.class, Mockito.withSettings().serializable());&lt;BR /&gt; Mockito.when(dummyService.dummyMethod("Level 3 Service Task")).thenReturn(null);&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;yields no problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But initializing&amp;nbsp; &lt;/SPAN&gt;&lt;EM&gt;dummyService&lt;/EM&gt;&lt;SPAN&gt; as a Mock using Mockito like that:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;CODE&gt;this.dummyService = Mockito.mock(DummyService.class, Mockito.withSettings().serializable());&lt;BR /&gt;&amp;nbsp; Mockito.when(this.dummyService.dummyMethod("Level 3 Service Task")).thenAnswer(new Answer&amp;lt;String&amp;gt;()&lt;BR /&gt;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; @Override&lt;BR /&gt;&amp;nbsp;&amp;nbsp; public String answer(final InvocationOnMock invocation) throws Throwable&lt;BR /&gt;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println("Called with mock");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "Called with mock";&lt;BR /&gt;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp; });&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;You can see both uses &lt;/SPAN&gt;&lt;SPAN style="text-decoration: underline;"&gt;Mockito.withSettings().serializable()&lt;/SPAN&gt;&lt;SPAN&gt; but the difference is in the &lt;/SPAN&gt;&lt;EM&gt;Mockito.when&lt;/EM&gt;&lt;SPAN&gt; part. So I've asked about whether there is a known limitation about that point.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Dec 2012 10:03:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/nested-callactivity-mockito-serialization-problem/m-p/137229#M96212</guid>
      <dc:creator>gokceng1</dc:creator>
      <dc:date>2012-12-20T10:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: Nested CallActivity Mockito Serialization Problem</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/nested-callactivity-mockito-serialization-problem/m-p/137230#M96213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think the mockito forum is a better place for this, as this is a mockito serialization-issue. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Perhaps your "answer" object should be serializable as weLl?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2012 08:15:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/nested-callactivity-mockito-serialization-problem/m-p/137230#M96213</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2012-12-21T08:15:15Z</dc:date>
    </item>
    <item>
      <title>Re: Nested CallActivity Mockito Serialization Problem</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/nested-callactivity-mockito-serialization-problem/m-p/137231#M96214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Frederik, I tried it without Activiti and Answer class seems to create problem as you said. Anybody concerned about the situation can follow Mockito mailing list topic &lt;/SPAN&gt;&lt;A href="https://groups.google.com/forum/?fromgroups=#!topic/mockito/8nfASzdf7z0" rel="nofollow noopener noreferrer"&gt;here&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Dec 2012 14:45:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/nested-callactivity-mockito-serialization-problem/m-p/137231#M96214</guid>
      <dc:creator>gokceng1</dc:creator>
      <dc:date>2012-12-24T14:45:34Z</dc:date>
    </item>
  </channel>
</rss>

