<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-2663</id>
	<title>Nabble - jMock</title>
	<updated>2009-11-09T12:23:55Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/jMock-f2663.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/jMock-f2663.html" />
	<subtitle type="html">jMock is a library for testing Java code using mock objects1. Mock objects help you design and test the interactions between the objects in your programs. The jMock package makes it quick and easy to define mock objects, so you don't break the rhythm of programming; lets you define flexible constraints over object interactions, reducing the brittleness of your tests; is easy to extend. jMock home is &lt;a href=&quot;http://jmock.codehaus.org/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.</subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26273074</id>
	<title>[jira] Commented: (JMOCK-197) Mocking a static nested class causes a net.sf.cglib.core.CodeGenerationException to be thrown.</title>
	<published>2009-11-09T12:23:55Z</published>
	<updated>2009-11-09T12:23:55Z</updated>
	<author>
		<name>JIRA jira@codehaus.org</name>
	</author>
	<content type="html">&lt;br&gt;&amp;nbsp; &amp;nbsp; [ &lt;a href=&quot;http://jira.codehaus.org/browse/JMOCK-197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=197751#action_197751&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://jira.codehaus.org/browse/JMOCK-197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=197751#action_197751&lt;/a&gt;&amp;nbsp;] 
&lt;br&gt;&lt;br&gt;Ryan Hoegg commented on JMOCK-197:
&lt;br&gt;----------------------------------
&lt;br&gt;&lt;br&gt;Did you ever make the small, self-contained JUnit test?
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Mocking a static nested class causes a net.sf.cglib.core.CodeGenerationException to be thrown.
&lt;br&gt;&amp;gt; ----------------------------------------------------------------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Key: JMOCK-197
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; URL: &lt;a href=&quot;http://jira.codehaus.org/browse/JMOCK-197&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://jira.codehaus.org/browse/JMOCK-197&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Project: jMock
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Issue Type: Bug
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Components: JMock 1.x.x Library
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;Affects Versions: 1.2.0
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Reporter: Ryan C. Payne
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; In some code that I have inherited I have a class with a static nested class. In the past (jMock 1.1.0) I was able to successfully mock this static nested class. After upgrading to jMock 1.2.0, this no longer works. I end up getting the following exception:
&lt;br&gt;&amp;gt; net.sf.cglib.core.CodeGenerationException: java.lang.IllegalAccessError--&amp;gt;tried to access method org.jmock.codegen.com.mycompany.core.util.DataPage$DataPageDefinition$$EnhancerByCGLIB$$3417fee6.CGLIB$setPageNumber$6(I)V from class org.jmock.codegen.org.jmock.codegen.com.mycompany.core.util.DataPage$DataPageDefinition$$EnhancerByCGLIB$$3417fee6$$FastClassByCGLIB$$e9f65fd5
&lt;br&gt;&amp;gt; 	at net.sf.cglib.core.ReflectUtils.newInstance(ReflectUtils.java:235)
&lt;br&gt;&amp;gt; 	at net.sf.cglib.core.ReflectUtils.newInstance(ReflectUtils.java:220)
&lt;br&gt;&amp;gt; 	at net.sf.cglib.proxy.Enhancer.createUsingReflection(Enhancer.java:636)
&lt;br&gt;&amp;gt; 	at net.sf.cglib.proxy.Enhancer.firstInstance(Enhancer.java:538)
&lt;br&gt;&amp;gt; 	at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:225)
&lt;br&gt;&amp;gt; 	at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
&lt;br&gt;&amp;gt; 	at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:304)
&lt;br&gt;&amp;gt; 	at org.jmock.cglib.CGLIBCoreMock.&amp;lt;init&amp;gt;(CGLIBCoreMock.java:63)
&lt;br&gt;&amp;gt; 	at org.jmock.cglib.CGLIBCoreMock.&amp;lt;init&amp;gt;(CGLIBCoreMock.java:46)
&lt;br&gt;&amp;gt; 	at org.jmock.cglib.CGLIBCoreMock.&amp;lt;init&amp;gt;(CGLIBCoreMock.java:35)
&lt;br&gt;&amp;gt; 	at org.jmock.cglib.MockObjectTestCase.newCoreMock(MockObjectTestCase.java:33)
&lt;br&gt;&amp;gt; 	at org.jmock.MockObjectTestCase.mock(MockObjectTestCase.java:67)
&lt;br&gt;&amp;gt; 	at org.jmock.MockObjectTestCase.mock(MockObjectTestCase.java:55)
&lt;br&gt;&amp;gt; 	at com.mycompany.core.persistence.hbm.HBMBaseDAOTest.testLimitResultSet(HBMBaseDAOTest.java:117)
&lt;br&gt;&amp;gt; Caused by: java.lang.IllegalAccessError: tried to access method org.jmock.codegen.com.mycompany.core.util.DataPage$DataPageDefinition$$EnhancerByCGLIB$$3417fee6.CGLIB$setPageNumber$6(I)V from class org.jmock.codegen.org.jmock.codegen.com.mycompany.core.util.DataPage$DataPageDefinition$$EnhancerByCGLIB$$3417fee6$$FastClassByCGLIB$$e9f65fd5
&lt;br&gt;&amp;gt; 	at org.jmock.codegen.org.jmock.codegen.com.mycompany.core.util.DataPage$DataPageDefinition$$EnhancerByCGLIB$$3417fee6$$FastClassByCGLIB$$e9f65fd5.invoke(&amp;lt;generated&amp;gt;)
&lt;br&gt;&amp;gt; 	at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:167)
&lt;br&gt;&amp;gt; 	at org.jmock.cglib.CGLIBCoreMock.intercept(CGLIBCoreMock.java:79)
&lt;br&gt;&amp;gt; 	at org.jmock.codegen.com.mycompany.core.util.DataPage$DataPageDefinition$$EnhancerByCGLIB$$3417fee6.setPageNumber(&amp;lt;generated&amp;gt;)
&lt;br&gt;&amp;gt; 	at com.mycompany.core.util.DataPage$DataPageDefinition.&amp;lt;init&amp;gt;(DataPage.java:280)
&lt;br&gt;&amp;gt; 	at com.mycompany.core.util.DataPage$DataPageDefinition.&amp;lt;init&amp;gt;(DataPage.java:267)
&lt;br&gt;&amp;gt; 	at org.jmock.codegen.com.mycompany.core.util.DataPage$DataPageDefinition$$EnhancerByCGLIB$$3417fee6.&amp;lt;init&amp;gt;(&amp;lt;generated&amp;gt;)
&lt;br&gt;&amp;gt; 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
&lt;br&gt;&amp;gt; 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
&lt;br&gt;&amp;gt; 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
&lt;br&gt;&amp;gt; 	at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
&lt;br&gt;&amp;gt; 	at net.sf.cglib.core.ReflectUtils.newInstance(ReflectUtils.java:228)
&lt;br&gt;&amp;gt; 	... 58 more
&lt;br&gt;&amp;gt; Research led me to the following:
&lt;br&gt;&amp;gt; &amp;nbsp; &lt;a href=&quot;http://www.gg3721.com/list/50/44427.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.gg3721.com/list/50/44427.html&lt;/a&gt;&amp;nbsp;
&lt;br&gt;&amp;gt; and the followup
&lt;br&gt;&amp;gt; &amp;nbsp; &lt;a href=&quot;http://www.gg3721.com/list/50/44774.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.gg3721.com/list/50/44774.html&lt;/a&gt;&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;If you think it was sent incorrectly contact one of the administrators: &lt;a href=&quot;http://jira.codehaus.org/secure/Administrators.jspa&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://jira.codehaus.org/secure/Administrators.jspa&lt;/a&gt;&lt;br&gt;-
&lt;br&gt;For more information on JIRA, see: &lt;a href=&quot;http://www.atlassian.com/software/jira&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.atlassian.com/software/jira&lt;/a&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/jMock---Dev-f2664.html&quot; embed=&quot;fixTarget[2664]&quot; target=&quot;_top&quot; &gt;jMock - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-jira--Created%3A-%28JMOCK-197%29-Mocking-a-static-nested-class-causes-a-net.sf.cglib.core.CodeGenerationException-to-be-thrown.-tp18724689p26273074.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26273075</id>
	<title>[jira] Commented: (JMOCK-125) Not able to mock classes with no visible construtor</title>
	<published>2009-11-09T12:23:55Z</published>
	<updated>2009-11-09T12:23:55Z</updated>
	<author>
		<name>JIRA jira@codehaus.org</name>
	</author>
	<content type="html">&lt;br&gt;&amp;nbsp; &amp;nbsp; [ &lt;a href=&quot;http://jira.codehaus.org/browse/JMOCK-125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=197752#action_197752&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://jira.codehaus.org/browse/JMOCK-125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=197752#action_197752&lt;/a&gt;&amp;nbsp;] 
&lt;br&gt;&lt;br&gt;Ryan Hoegg commented on JMOCK-125:
&lt;br&gt;----------------------------------
&lt;br&gt;&lt;br&gt;Do you plan to fix this for 1.2.0 as well?
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Not able to mock classes with no visible construtor
&lt;br&gt;&amp;gt; ---------------------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Key: JMOCK-125
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; URL: &lt;a href=&quot;http://jira.codehaus.org/browse/JMOCK-125&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://jira.codehaus.org/browse/JMOCK-125&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Project: jMock
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Issue Type: Bug
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;Affects Versions: 1.2.0, 2.1.0-RC4
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Reporter: Chuck Y
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Assignee: Nat Pryce
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fix For: 2.1.0-RC4
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Attachments: mocktest.jar
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; java.lang.IllegalArgumentException: No visible constructors in class org.src.TestClass
&lt;br&gt;&amp;gt; 	at net.sf.cglib.proxy.Enhancer.filterConstructors(Enhancer.java:531)
&lt;br&gt;&amp;gt; 	at net.sf.cglib.proxy.Enhancer.generateClass(Enhancer.java:448)
&lt;br&gt;&amp;gt; 	at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
&lt;br&gt;&amp;gt; 	at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216)
&lt;br&gt;&amp;gt; 	at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
&lt;br&gt;&amp;gt; 	at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:304)
&lt;br&gt;&amp;gt; 	at org.jmock.cglib.CGLIBCoreMock.&amp;lt;init&amp;gt;(CGLIBCoreMock.java:63)
&lt;br&gt;&amp;gt; 	at org.jmock.cglib.CGLIBCoreMock.&amp;lt;init&amp;gt;(CGLIBCoreMock.java:46)
&lt;br&gt;&amp;gt; 	at org.jmock.cglib.CGLIBCoreMock.&amp;lt;init&amp;gt;(CGLIBCoreMock.java:35)
&lt;br&gt;&amp;gt; 	at org.jmock.cglib.MockObjectTestCase.newCoreMock(MockObjectTestCase.java:33)
&lt;br&gt;&amp;gt; 	at org.jmock.MockObjectTestCase.mock(MockObjectTestCase.java:67)
&lt;br&gt;&amp;gt; 	at org.jmock.MockObjectTestCase.mock(MockObjectTestCase.java:55)
&lt;br&gt;&amp;gt; 	at org.src.ClassUnderTestTest.test(ClassUnderTestTest.java:63)
&lt;br&gt;&amp;gt; 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
&lt;br&gt;&amp;gt; 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
&lt;br&gt;&amp;gt; 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
&lt;br&gt;&amp;gt; 	at java.lang.reflect.Method.invoke(Unknown Source)
&lt;br&gt;&amp;gt; 	at junit.framework.TestCase.runTest(TestCase.java:164)
&lt;br&gt;&amp;gt; 	at org.jmock.core.VerifyingTestCase.runBare(VerifyingTestCase.java:39)
&lt;br&gt;&amp;gt; 	at junit.framework.TestResult$1.protect(TestResult.java:110)
&lt;br&gt;&amp;gt; 	at junit.framework.TestResult.runProtected(TestResult.java:128)
&lt;br&gt;&amp;gt; 	at junit.framework.TestResult.run(TestResult.java:113)
&lt;br&gt;&amp;gt; 	at junit.framework.TestCase.run(TestCase.java:120)
&lt;br&gt;&amp;gt; 	at junit.framework.TestSuite.runTest(TestSuite.java:228)
&lt;br&gt;&amp;gt; 	at junit.framework.TestSuite.run(TestSuite.java:223)
&lt;br&gt;&amp;gt; 	at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
&lt;br&gt;&amp;gt; 	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
&lt;br&gt;&amp;gt; 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
&lt;br&gt;&amp;gt; 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
&lt;br&gt;&amp;gt; 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
&lt;br&gt;&amp;gt; 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
&lt;br&gt;&amp;gt; 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
&lt;br&gt;&amp;gt; If filterConstructors() is overridden to do nothing, by patching.. I get this exception...
&lt;br&gt;&amp;gt; net.sf.cglib.core.CodeGenerationException: java.lang.IllegalAccessError--&amp;gt;tried to access method org.src.TestClass.&amp;lt;init&amp;gt;()V from class org.jmock.codegen.org.src.TestClass$$EnhancerByCGLIB$$11111fbf
&lt;br&gt;&amp;gt; 	at net.sf.cglib.core.ReflectUtils.newInstance(ReflectUtils.java:235)
&lt;br&gt;&amp;gt; 	at net.sf.cglib.core.ReflectUtils.newInstance(ReflectUtils.java:220)
&lt;br&gt;&amp;gt; 	at net.sf.cglib.proxy.Enhancer.createUsingReflection(Enhancer.java:636)
&lt;br&gt;&amp;gt; 	at net.sf.cglib.proxy.Enhancer.firstInstance(Enhancer.java:538)
&lt;br&gt;&amp;gt; 	at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:225)
&lt;br&gt;&amp;gt; 	at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
&lt;br&gt;&amp;gt; 	at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:304)
&lt;br&gt;&amp;gt; 	at org.jmock.cglib.CGLIBCoreMock.&amp;lt;init&amp;gt;(CGLIBCoreMock.java:63)
&lt;br&gt;&amp;gt; 	at org.jmock.cglib.CGLIBCoreMock.&amp;lt;init&amp;gt;(CGLIBCoreMock.java:46)
&lt;br&gt;&amp;gt; 	at org.jmock.cglib.CGLIBCoreMock.&amp;lt;init&amp;gt;(CGLIBCoreMock.java:35)
&lt;br&gt;&amp;gt; 	at org.jmock.cglib.MockObjectTestCase.newCoreMock(MockObjectTestCase.java:33)
&lt;br&gt;&amp;gt; 	at org.jmock.MockObjectTestCase.mock(MockObjectTestCase.java:67)
&lt;br&gt;&amp;gt; 	at org.jmock.MockObjectTestCase.mock(MockObjectTestCase.java:55)
&lt;br&gt;&amp;gt; 	at org.src.ClassUnderTestTest.test(ClassUnderTestTest.java:66)
&lt;br&gt;&amp;gt; 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
&lt;br&gt;&amp;gt; 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
&lt;br&gt;&amp;gt; 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
&lt;br&gt;&amp;gt; 	at java.lang.reflect.Method.invoke(Unknown Source)
&lt;br&gt;&amp;gt; 	at junit.framework.TestCase.runTest(TestCase.java:164)
&lt;br&gt;&amp;gt; 	at org.jmock.core.VerifyingTestCase.runBare(VerifyingTestCase.java:39)
&lt;br&gt;&amp;gt; 	at junit.framework.TestResult$1.protect(TestResult.java:110)
&lt;br&gt;&amp;gt; 	at junit.framework.TestResult.runProtected(TestResult.java:128)
&lt;br&gt;&amp;gt; 	at junit.framework.TestResult.run(TestResult.java:113)
&lt;br&gt;&amp;gt; 	at junit.framework.TestCase.run(TestCase.java:120)
&lt;br&gt;&amp;gt; 	at junit.framework.TestSuite.runTest(TestSuite.java:228)
&lt;br&gt;&amp;gt; 	at junit.framework.TestSuite.run(TestSuite.java:223)
&lt;br&gt;&amp;gt; 	at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
&lt;br&gt;&amp;gt; 	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
&lt;br&gt;&amp;gt; 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
&lt;br&gt;&amp;gt; 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
&lt;br&gt;&amp;gt; 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
&lt;br&gt;&amp;gt; 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
&lt;br&gt;&amp;gt; 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
&lt;br&gt;&amp;gt; Caused by: java.lang.IllegalAccessError: tried to access method org.src.TestClass.&amp;lt;init&amp;gt;()V from class org.jmock.codegen.org.src.TestClass$$EnhancerByCGLIB$$11111fbf
&lt;br&gt;&amp;gt; 	at org.jmock.codegen.org.src.TestClass$$EnhancerByCGLIB$$11111fbf.&amp;lt;init&amp;gt;(&amp;lt;generated&amp;gt;)
&lt;br&gt;&amp;gt; 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
&lt;br&gt;&amp;gt; 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
&lt;br&gt;&amp;gt; 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
&lt;br&gt;&amp;gt; 	at java.lang.reflect.Constructor.newInstance(Unknown Source)
&lt;br&gt;&amp;gt; 	at net.sf.cglib.core.ReflectUtils.newInstance(ReflectUtils.java:228)
&lt;br&gt;&amp;gt; 	... 32 more
&lt;br&gt;&amp;gt; No offence to JMock developers, but Ea$yMock is able to do this.
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;If you think it was sent incorrectly contact one of the administrators: &lt;a href=&quot;http://jira.codehaus.org/secure/Administrators.jspa&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://jira.codehaus.org/secure/Administrators.jspa&lt;/a&gt;&lt;br&gt;-
&lt;br&gt;For more information on JIRA, see: &lt;a href=&quot;http://www.atlassian.com/software/jira&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.atlassian.com/software/jira&lt;/a&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/jMock---Dev-f2664.html&quot; embed=&quot;fixTarget[2664]&quot; target=&quot;_top&quot; &gt;jMock - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-jira--Created%3A-%28JMOCK-125%29-Not-able-to-mock-classes-with-no-visible-construtor-tp10711453p26273075.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26258696</id>
	<title>Ability to use jMock through the Rule mechanism</title>
	<published>2009-11-08T14:26:27Z</published>
	<updated>2009-11-08T14:26:27Z</updated>
	<author>
		<name>Ivan Yatskevich</name>
	</author>
	<content type="html">Hello everybody!
&lt;br&gt;&lt;br&gt;As all of you probably know a new feature, Rule mechanism, has been
&lt;br&gt;added to JUnit 4.7.
&lt;br&gt;After the discussion with David Saff (main JUnit contributor) and Nat
&lt;br&gt;Pryce it comes out that it is better to use jMock through the Rule
&lt;br&gt;mechanism and not through the runner:
&lt;br&gt;&lt;br&gt;public class JMockRuleTest {
&lt;br&gt;&amp;nbsp; @Rule public Verifier jmock = new JMockVerifier();
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;This approach will allow to use jMock with a custom JUnit runner like
&lt;br&gt;Theories or your favorite one.
&lt;br&gt;&lt;br&gt;I'm going to implement this feature and want to know your valuable
&lt;br&gt;opinion on what kind of API you expect.
&lt;br&gt;Personally I think that this new API will be similar to the current
&lt;br&gt;Mockery's one.
&lt;br&gt;&lt;br&gt;I've already created a new issue in JIRA -
&lt;br&gt;&lt;a href=&quot;http://jira.codehaus.org/browse/JMOCK-237&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://jira.codehaus.org/browse/JMOCK-237&lt;/a&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Best regards,
&lt;br&gt;Ivan Yatskevich
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/jMock---User-f2665.html&quot; embed=&quot;fixTarget[2665]&quot; target=&quot;_top&quot; &gt;jMock - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Ability-to-use-jMock-through-the-Rule-mechanism-tp26258696p26258696.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26258349</id>
	<title>[jira] Created: (JMOCK-237) Ability to use jMock through the Rule mechanism (introduced in JUnit 4.7)</title>
	<published>2009-11-08T13:47:55Z</published>
	<updated>2009-11-08T13:47:55Z</updated>
	<author>
		<name>JIRA jira@codehaus.org</name>
	</author>
	<content type="html">Ability to use jMock through the Rule mechanism (introduced in JUnit 4.7)
&lt;br&gt;-------------------------------------------------------------------------
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Key: JMOCK-237
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;URL: &lt;a href=&quot;http://jira.codehaus.org/browse/JMOCK-237&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://jira.codehaus.org/browse/JMOCK-237&lt;/a&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Project: jMock
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Issue Type: New Feature
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Components: JMock 2.x.x Library
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Reporter: Ivan Yatskevich
&lt;br&gt;&lt;br&gt;&lt;br&gt;This new feature should allow to use jMock in the following way:
&lt;br&gt;&lt;br&gt;public class JMockRuleTest {
&lt;br&gt;&amp;nbsp;@Rule public Verifier jmock = new JMockVerifier();
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;It will also open the possibility of using jMock with a custom JUnit runner like Theories.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;If you think it was sent incorrectly contact one of the administrators: &lt;a href=&quot;http://jira.codehaus.org/secure/Administrators.jspa&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://jira.codehaus.org/secure/Administrators.jspa&lt;/a&gt;&lt;br&gt;-
&lt;br&gt;For more information on JIRA, see: &lt;a href=&quot;http://www.atlassian.com/software/jira&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.atlassian.com/software/jira&lt;/a&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/jMock---Dev-f2664.html&quot; embed=&quot;fixTarget[2664]&quot; target=&quot;_top&quot; &gt;jMock - Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-jira--Created%3A-%28JMOCK-237%29-Ability-to-use-jMock-through-the-Rule-mechanism-%28introduced-in-JUnit-4.7%29-tp26258349p26258349.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26131106</id>
	<title>Re: Advice on testing my classes that has many third party API calls.</title>
	<published>2009-10-30T07:33:28Z</published>
	<updated>2009-10-30T07:33:28Z</updated>
	<author>
		<name>Steve Freeman-2</name>
	</author>
	<content type="html">On 27 Oct 2009, at 10:36, LadyCoconut wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; My questions are:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 1. in my test I am using the matchers with(any(OpertionOptions.class),
&lt;br&gt;&amp;gt; with(any(Profile.class) and such....should I be mocking these concrete
&lt;br&gt;&amp;gt; classes using the ClassImposteriser and setting them up and checking &amp;nbsp;
&lt;br&gt;&amp;gt; the
&lt;br&gt;&amp;gt; exact expectations of these? It feels a bit wrong. All I want to &amp;nbsp;
&lt;br&gt;&amp;gt; test is
&lt;br&gt;&amp;gt; that a call to the service is made and that I get back an expected &amp;nbsp;
&lt;br&gt;&amp;gt; type with
&lt;br&gt;&amp;gt; some parameters in it?
&lt;/div&gt;&lt;br&gt;You want to check, for example, that the ObjectIdentitySet has been &amp;nbsp;
&lt;br&gt;set up correctly? You could write a more precise matcher that checks &amp;nbsp;
&lt;br&gt;the values within the ObjectIdSet that was passed in. Something like:
&lt;br&gt;&lt;br&gt;oneOf(objectService).get(with(objectIdentitySetWithId(1)), ...
&lt;br&gt;&lt;br&gt;If you just want to let the call go through, then the any() clauses &amp;nbsp;
&lt;br&gt;are fine--that's your intention. You can simplify it further, if &amp;nbsp;
&lt;br&gt;there's only one call to an object:
&lt;br&gt;&lt;br&gt;allowing(objectService); will(returnValue(dataPackage));
&lt;br&gt;&lt;br&gt;if that's all you care about. (Remember: Stub Queries, Expect Actions)
&lt;br&gt;&lt;br&gt;&amp;gt; 2. Should I be spending my time skinning and wrapping the API for &amp;nbsp;
&lt;br&gt;&amp;gt; testing?
&lt;br&gt;&amp;gt; As its rather a small project at the moment, I managed to create a &amp;nbsp;
&lt;br&gt;&amp;gt; stub
&lt;br&gt;&amp;gt; service initially that returns some duff data.
&lt;br&gt;&lt;br&gt;That depends :) At the least, I'd have some kind of interface in my &amp;nbsp;
&lt;br&gt;domain code that protected me from the library, so there were no &amp;nbsp;
&lt;br&gt;references.
&lt;br&gt;&lt;br&gt;S.
&lt;br&gt;&lt;br&gt;Steve Freeman
&lt;br&gt;&lt;br&gt;Winner of the Agile Alliance Gordon Pask award 2006
&lt;br&gt;Book: &lt;a href=&quot;http://www.growing-object-oriented-software.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.growing-object-oriented-software.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;+44 (0) 797 179 4105
&lt;br&gt;M3P Limited. &amp;nbsp;&lt;a href=&quot;http://www.m3p.co.uk&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.m3p.co.uk&lt;/a&gt;&lt;br&gt;Registered office. 2 Church Street, Burnham, Bucks, SL1 7HZ.
&lt;br&gt;Company registered in England &amp; Wales. Number 03689627
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/jMock---User-f2665.html&quot; embed=&quot;fixTarget[2665]&quot; target=&quot;_top&quot; &gt;jMock - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Advice-on-testing-my-classes-that-has-many-third-party-API-calls.-tp26075443p26131106.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26099734</id>
	<title>Re: Differences between jMock &amp; Mockito</title>
	<published>2009-10-28T11:27:52Z</published>
	<updated>2009-10-28T11:27:52Z</updated>
	<author>
		<name>Steve Freeman-2</name>
	</author>
	<content type="html">&lt;div class='shrinkable-quote'&gt;&amp;gt; Julian Hall wrote:
&lt;br&gt;&amp;gt;&amp;gt; isaiah perumalla wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Jmock will highlight badly designed communication protocols &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; between object under test and its collaborators. On the other &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; hand, frameworks like mockito by default ignore all calls between &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; the object under test and it's mocked collaborator(s) and only &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; verifies calls you explicitly specify.
&lt;br&gt;&amp;gt;&amp;gt; There is, of course, a halfway ground to consider. &amp;nbsp;When I'm &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; working in .NET, I tend to use Rhino.Mocks. &amp;nbsp;This has the &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; interesting facility that if you call MockRepository.CreateMock to &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; create your mock, you end up with something that behaves like JMock &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; does, but if you call MockRepository.DynamicMock you end up with a &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; stub implementation that ignores unexpected calls, or you can use &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; MockRepository.PartialMock when mocking a concrete class to get a &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; stub that passes calls to the original implementation by default. &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; It's still a &amp;quot;set expectations before running your code&amp;quot; style of &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; interaction rather than the &amp;quot;verify what happened after you've done &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; it&amp;quot; style you use with Mockito, but it's a little more flexible &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; than JMock.
&lt;/div&gt;&lt;br&gt;Actually, JMock does the first two without have to choose when &amp;nbsp;
&lt;br&gt;declaring the mock. The third is just a bad idea unless it's an &amp;nbsp;
&lt;br&gt;emergency :)
&lt;br&gt;&lt;br&gt;S.
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/jMock---User-f2665.html&quot; embed=&quot;fixTarget[2665]&quot; target=&quot;_top&quot; &gt;jMock - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Differences-between-jMock---Mockito-tp26023576p26099734.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26098892</id>
	<title>Re: Differences between jMock &amp; Mockito</title>
	<published>2009-10-28T10:37:18Z</published>
	<updated>2009-10-28T10:37:18Z</updated>
	<author>
		<name>Rick Fisk-2</name>
	</author>
	<content type="html">&lt;br&gt;PowerMock works a bit like this. It allows you to create partial mocks 
&lt;br&gt;and to mock static objects. Unfortunately if you're testing spring 
&lt;br&gt;managers or controllers there are issues to workaround with bean 
&lt;br&gt;definitions. It has interfaces to mockito and EasyMock also.
&lt;br&gt;&lt;br&gt;Julian Hall wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; isaiah perumalla wrote:
&lt;br&gt;&amp;gt;&amp;gt; Jmock will highlight badly designed communication protocols between 
&lt;br&gt;&amp;gt;&amp;gt; object under test and its collaborators. On the other hand, 
&lt;br&gt;&amp;gt;&amp;gt; frameworks like mockito by default ignore all calls between the 
&lt;br&gt;&amp;gt;&amp;gt; object under test and it's mocked collaborator(s) and only verifies 
&lt;br&gt;&amp;gt;&amp;gt; calls you explicitly specify.
&lt;br&gt;&amp;gt; There is, of course, a halfway ground to consider. &amp;nbsp;When I'm working 
&lt;br&gt;&amp;gt; in .NET, I tend to use Rhino.Mocks. &amp;nbsp;This has the interesting facility 
&lt;br&gt;&amp;gt; that if you call MockRepository.CreateMock to create your mock, you 
&lt;br&gt;&amp;gt; end up with something that behaves like JMock does, but if you call 
&lt;br&gt;&amp;gt; MockRepository.DynamicMock you end up with a stub implementation that 
&lt;br&gt;&amp;gt; ignores unexpected calls, or you can use MockRepository.PartialMock 
&lt;br&gt;&amp;gt; when mocking a concrete class to get a stub that passes calls to the 
&lt;br&gt;&amp;gt; original implementation by default. &amp;nbsp;It's still a &amp;quot;set expectations 
&lt;br&gt;&amp;gt; before running your code&amp;quot; style of interaction rather than the &amp;quot;verify 
&lt;br&gt;&amp;gt; what happened after you've done it&amp;quot; style you use with Mockito, but 
&lt;br&gt;&amp;gt; it's a little more flexible than JMock.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; (The API's also a little cleaner, but that's because .NET allows a 
&lt;br&gt;&amp;gt; cleaner API than Java does, largely due to having proper generic types)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe from this list, please visit:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/jMock---User-f2665.html&quot; embed=&quot;fixTarget[2665]&quot; target=&quot;_top&quot; &gt;jMock - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Differences-between-jMock---Mockito-tp26023576p26098892.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26075443</id>
	<title>Advice on testing my classes that has many third party API calls.</title>
	<published>2009-10-27T03:36:33Z</published>
	<updated>2009-10-27T03:36:33Z</updated>
	<author>
		<name>LadyCoconut</name>
	</author>
	<content type="html">Hello Everyone, 
&lt;br&gt;&lt;br&gt;I have some experience in jMock. Currently using it with JUnit 3 (long story). 
&lt;br&gt;&lt;br&gt;Anyway, I've had to develop a little application that depends heavily on third party libraries. The libraries are basically &amp;nbsp;used for pulling documents from a repository. Some of the classes have interfaces (not many) and there are many concrete classes. 
&lt;br&gt;&lt;br&gt;Assume the following test code:
&lt;br&gt;&lt;br&gt;&lt;b&gt;final IObjectService objectService = mock(IObjectService.class);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;final DataPackage dataPackage = createDataPackage();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;checking(new Expectations() {{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; oneOf (serviceContext).getIdentityCount(); will(returnValue(1));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; oneOf (serviceContext).setProfile(with(any(Profile.class)));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; oneOf (serviceFactory).getLocalService(with(IObjectService.class), 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 		with(serviceContext)); will(returnValue(objectService));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 		
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; oneOf (objectService).get(with(any(ObjectIdentitySet.class)), 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 		with(any(OperationOptions.class))); will(returnValue(dataPackage));
&lt;br&gt;}});
&lt;br&gt;&lt;br&gt;&lt;/b&gt;&lt;br&gt;&lt;br&gt;Now here is the code that it is testing (bit ugly) but bear with me...
&lt;br&gt;&lt;br&gt;&lt;b&gt;if(serviceContext.getIdentityCount() == 0) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; serviceContext.addIdentity(repositoryIdentity);
&lt;br&gt;}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;ObjectId id = new ObjectId(objectId);
&lt;br&gt;ObjectIdentity&amp;lt;ObjectId&amp;gt; objectIdentity = new ObjectIdentity&amp;lt;ObjectId&amp;gt;(id, repositoryIdentity.getRepositoryName());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;ObjectIdentitySet objectIdSet = new ObjectIdentitySet();
&lt;br&gt;objectIdSet.addIdentity(objectIdentity);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;ContentTransferProfile transferProfile = new ContentTransferProfile();
&lt;br&gt;transferProfile.setTransferMode(ContentTransferMode.MTOM);
&lt;br&gt;transferProfile.setCachedContentTransferAllowed(true);
&lt;br&gt;transferProfile.setAsyncContentTransferAllowed(true);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;serviceContext.setProfile(transferProfile);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;IObjectService objectService = serviceFactory.getLocalService(IObjectService.class, serviceContext);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;OperationOptions operationsOptions = getOperationsOptionsProfile();
&lt;br&gt;DataPackage dataPackage = objectService.get(objectIdSet, operationsOptions);
&lt;br&gt;Content content = dataPackage.getDataObjects().get(0).getContents().get(0); //check&lt;/b&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;My questions are:
&lt;br&gt;&lt;br&gt;&amp;nbsp;1. in my test I am using the matchers with(any(OpertionOptions.class), with(any(Profile.class) and such....should I be mocking these concrete classes using the ClassImposteriser and setting them up and checking the exact expectations of these? It feels a bit wrong. All I want to test is that a call to the service is made and that I get back an expected type with some parameters in it? &amp;nbsp; 
&lt;br&gt;&lt;br&gt;&amp;nbsp;2. Should I be spending my time skinning and wrapping the API for testing? As its rather a small project at the moment, I managed to create a stub service initially that returns some duff data. 
&lt;br&gt;&lt;br&gt;Any thoughts would be welcome. 
&lt;br&gt;&lt;br&gt;Regards
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/jMock---User-f2665.html&quot; embed=&quot;fixTarget[2665]&quot; target=&quot;_top&quot; &gt;jMock - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Advice-on-testing-my-classes-that-has-many-third-party-API-calls.-tp26075443p26075443.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26060153</id>
	<title>Re: Differences between jMock &amp; Mockito</title>
	<published>2009-10-26T06:51:29Z</published>
	<updated>2009-10-26T06:51:29Z</updated>
	<author>
		<name>Steve Freeman-2</name>
	</author>
	<content type="html">With tests like this, there's not much difference, although both tests &amp;nbsp;
&lt;br&gt;could be made more compact. It's mostly stubbing, since there's no &amp;nbsp;
&lt;br&gt;external change in state. There's a bit of duplication in the mockito &amp;nbsp;
&lt;br&gt;version for the verification but, as you point out, it's not &amp;nbsp;
&lt;br&gt;interesting here. Even easymock could be made to work for these tests.
&lt;br&gt;&lt;br&gt;I think the differences (if any) will become more apparent when the &amp;nbsp;
&lt;br&gt;code deals in more behaviour than values. Here's an example from the &amp;nbsp;
&lt;br&gt;book (hope it doesn't get mangled by line-wrapping):
&lt;br&gt;&lt;br&gt;public class SniperLauncherTest {
&lt;br&gt;&amp;nbsp; &amp;nbsp;private final States auctionState = context.states(&amp;quot;auction state&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .startsAs(&amp;quot;not joined&amp;quot;);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;@Test public void addsNewSniperToCollectorAndThenJoinsAuction() {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;final String itemId = &amp;quot;item 123&amp;quot;;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;context.checking(new Expectations() {{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;allowing(auctionHouse).auctionFor(itemId); will(returnValue 
&lt;br&gt;(auction));
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;oneOf(sniperCollector).addSniper(with(sniperForItem(item)));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;when(auctionState.is(&amp;quot;not &amp;nbsp;
&lt;br&gt;joined&amp;quot;)); &amp;nbsp; &amp;nbsp; &amp;nbsp; 	
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;oneOf(auction).addAuctionEventListener(with(sniperForItem 
&lt;br&gt;(itemId)));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;when(auctionState.is(&amp;quot;not &amp;nbsp;
&lt;br&gt;joined&amp;quot;));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;one(auction).join(); then(auctionState.is(&amp;quot;joined&amp;quot;));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}});
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;launcher.joinAuction(itemId);
&lt;br&gt;&amp;nbsp; &amp;nbsp;}
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;which describes the relationships between a &amp;quot;launcher&amp;quot;, an &amp;quot;auction&amp;quot;, &amp;nbsp;
&lt;br&gt;and a &amp;quot;sniperCollector&amp;quot;. This is about protocols between objects, not &amp;nbsp;
&lt;br&gt;just method calls, and maps nicely onto a state-transition diagram we &amp;nbsp;
&lt;br&gt;drew to describe these relationships. We don't need this all the time, &amp;nbsp;
&lt;br&gt;but when we do, we really do.
&lt;br&gt;&lt;br&gt;S.
&lt;br&gt;&lt;br&gt;On 25 Oct 2009, at 23:56, Neil Swingler wrote:
&lt;br&gt;&amp;gt; I have just given myself a 30 minute crash course in jmock2 by &amp;nbsp;
&lt;br&gt;&amp;gt; converting one of jmock's very own unit tests to Mockito. OK I only &amp;nbsp;
&lt;br&gt;&amp;gt; chose the first test but I think it gives a flavour of the &amp;nbsp;
&lt;br&gt;&amp;gt; differences. The full compiling class is attached but here is the &amp;nbsp;
&lt;br&gt;&amp;gt; interesting bit. Personally I would probably skip the verify steps &amp;nbsp;
&lt;br&gt;&amp;gt; in the mockito version but kept them in for completeness.
&lt;br&gt;&amp;gt; [...]
&lt;br&gt;&lt;br&gt;Steve Freeman
&lt;br&gt;&lt;br&gt;Winner of the Agile Alliance Gordon Pask award 2006
&lt;br&gt;Book: &lt;a href=&quot;http://www.growing-object-oriented-software.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.growing-object-oriented-software.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;+44 (0) 797 179 4105
&lt;br&gt;M3P Limited. &amp;nbsp;&lt;a href=&quot;http://www.m3p.co.uk&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.m3p.co.uk&lt;/a&gt;&lt;br&gt;Registered office. 2 Church Street, Burnham, Bucks, SL1 7HZ.
&lt;br&gt;Company registered in England &amp; Wales. Number 03689627
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/jMock---User-f2665.html&quot; embed=&quot;fixTarget[2665]&quot; target=&quot;_top&quot; &gt;jMock - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Differences-between-jMock---Mockito-tp26023576p26060153.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26055560</id>
	<title>Re: Differences between jMock &amp; Mockito</title>
	<published>2009-10-26T00:50:09Z</published>
	<updated>2009-10-26T00:50:09Z</updated>
	<author>
		<name>Neil Swingler</name>
	</author>
	<content type="html">&lt;br&gt;Well here the stub part is being separated from the expectation part. I
&lt;br&gt;&lt;br&gt;think this is not a bad thing. As I said I would personally delete the
&lt;br&gt;&lt;br&gt;verification calls as they duplicate the checking done by the asserts at
&lt;br&gt;&lt;br&gt;the end anyway. I just left them in to demonstrate mockito.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;- Neil
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;On Mon, 26 Oct 2009 07:05:14 +0000, Nat Pryce &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26055560&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;nat.pryce@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; They look not too different apart from Mockito makes you duplicate
&lt;br&gt;&lt;br&gt;&amp;gt; expectations a bit.
&lt;br&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;&amp;gt; An interesting comparison might be a test that uses jMock's States
&lt;br&gt;&lt;br&gt;&amp;gt; mechanism to control ordering and vary the behaviour of mocked calls.
&lt;br&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;&amp;gt; --Nat
&lt;br&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;&amp;gt; On Sunday, October 25, 2009, Neil Swingler &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26055560&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;neil@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; I have just given myself a 30 minute crash course in jmock2 by
&lt;br&gt;&lt;br&gt;converting
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; one of jmock's very own unit tests to Mockito. OK I only chose the first
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; test but I think it gives a flavour of the differences. The full
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; compiling class is attached but here is the interesting bit. Personally
&lt;br&gt;&lt;br&gt;I
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; would probably skip the verify steps in the mockito version but kept
&lt;br&gt;&lt;br&gt;them
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; in for completeness.
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;  public void testLoadsObjectThatIsNotCachedWithJmock() {
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;      Mockery context = new Mockery() {{
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;         
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;setExpectationErrorTranslator(JUnit3ErrorTranslator.INSTANCE);
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;      }};
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;      final Clock clock = context.mock(Clock.class);
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;      final ObjectLoader loader = context.mock(ObjectLoader.class,
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;&amp;quot;loader&amp;quot;);
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;      ReloadPolicy reloadPolicy = context.mock(ReloadPolicy.class);
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;      TimedCache cache = new TimedCache(loader, clock,
&lt;br&gt;&lt;br&gt;reloadPolicy);
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;      context.checking(new Expectations() {{
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;          allowing (clock).time(); will(returnValue(loadTime));
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;          oneOf (loader).load(&amp;quot;key1&amp;quot;); will(returnValue(VALUE1));
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;          oneOf (loader).load(&amp;quot;key2&amp;quot;); will(returnValue(VALUE2));
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;      }});
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;      Object actualValue1 = cache.lookup(&amp;quot;key1&amp;quot;);
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;      Object actualValue2 = cache.lookup(&amp;quot;key2&amp;quot;);
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;            context.assertIsSatisfied();
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;      assertEquals(&amp;quot;lookup with key1&amp;quot;, VALUE1, actualValue1);
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;      assertEquals(&amp;quot;lookup with key2&amp;quot;, VALUE2, actualValue2);
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;  }
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;  public void testLoadsObjectThatIsNotCachedWithMockito() {
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;      Clock clock = mock(Clock.class);
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;      ObjectLoader loader = mock(ObjectLoader.class, &amp;quot;loader&amp;quot;);
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;      ReloadPolicy reloadPolicy = mock(ReloadPolicy.class);
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;      TimedCache cache = new TimedCache(loader, clock,
&lt;br&gt;&lt;br&gt;reloadPolicy);
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;      when(clock.time()).thenReturn(loadTime);
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;      when(loader.load(eq(&amp;quot;key1&amp;quot;))).thenReturn(VALUE1);
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;      when(loader.load(eq(&amp;quot;key2&amp;quot;))).thenReturn(VALUE2);
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;      Object actualValue1 = cache.lookup(&amp;quot;key1&amp;quot;);
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;      Object actualValue2 = cache.lookup(&amp;quot;key2&amp;quot;);
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;            verify(loader).load(&amp;quot;key1&amp;quot;);
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;      verify(loader).load(&amp;quot;key2&amp;quot;);
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;            verifyNoMoreInteractions(loader);
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;      assertEquals(&amp;quot;lookup with key1&amp;quot;, VALUE1, actualValue1);
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;      assertEquals(&amp;quot;lookup with key2&amp;quot;, VALUE2, actualValue2);
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;  }
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; - Neil
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/jMock---User-f2665.html&quot; embed=&quot;fixTarget[2665]&quot; target=&quot;_top&quot; &gt;jMock - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Differences-between-jMock---Mockito-tp26023576p26055560.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26055231</id>
	<title>Re: Differences between jMock &amp; Mockito</title>
	<published>2009-10-26T00:05:14Z</published>
	<updated>2009-10-26T00:05:14Z</updated>
	<author>
		<name>Nat Pryce</name>
	</author>
	<content type="html">They look not too different apart from Mockito makes you duplicate
&lt;br&gt;expectations a bit.
&lt;br&gt;&lt;br&gt;An interesting comparison might be a test that uses jMock's States
&lt;br&gt;mechanism to control ordering and vary the behaviour of mocked calls.
&lt;br&gt;&lt;br&gt;--Nat
&lt;br&gt;&lt;br&gt;On Sunday, October 25, 2009, Neil Swingler &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26055231&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;neil@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I have just given myself a 30 minute crash course in jmock2 by converting one of jmock's very own unit tests to Mockito. OK I only chose the first test but I think it gives a flavour of the differences. The full compiling class is attached but here is the interesting bit. Personally I would probably skip the verify steps in the mockito version but kept them in for completeness.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;  public void testLoadsObjectThatIsNotCachedWithJmock() {
&lt;br&gt;&amp;gt; &amp;nbsp;      Mockery context = new Mockery() {{
&lt;br&gt;&amp;gt; &amp;nbsp;          setExpectationErrorTranslator(JUnit3ErrorTranslator.INSTANCE);
&lt;br&gt;&amp;gt; &amp;nbsp;      }};
&lt;br&gt;&amp;gt; &amp;nbsp;      final Clock clock = context.mock(Clock.class);
&lt;br&gt;&amp;gt; &amp;nbsp;      final ObjectLoader loader = context.mock(ObjectLoader.class, &amp;quot;loader&amp;quot;);
&lt;br&gt;&amp;gt; &amp;nbsp;      ReloadPolicy reloadPolicy = context.mock(ReloadPolicy.class);
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;      TimedCache cache = new TimedCache(loader, clock, reloadPolicy);
&lt;br&gt;&amp;gt; &amp;nbsp;      context.checking(new Expectations() {{
&lt;br&gt;&amp;gt; &amp;nbsp;          allowing (clock).time(); will(returnValue(loadTime));
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;          oneOf (loader).load(&amp;quot;key1&amp;quot;); will(returnValue(VALUE1));
&lt;br&gt;&amp;gt; &amp;nbsp;          oneOf (loader).load(&amp;quot;key2&amp;quot;); will(returnValue(VALUE2));
&lt;br&gt;&amp;gt; &amp;nbsp;      }});
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;      Object actualValue1 = cache.lookup(&amp;quot;key1&amp;quot;);
&lt;br&gt;&amp;gt; &amp;nbsp;      Object actualValue2 = cache.lookup(&amp;quot;key2&amp;quot;);
&lt;br&gt;&amp;gt; &amp;nbsp;            context.assertIsSatisfied();
&lt;br&gt;&amp;gt; &amp;nbsp;      assertEquals(&amp;quot;lookup with key1&amp;quot;, VALUE1, actualValue1);
&lt;br&gt;&amp;gt; &amp;nbsp;      assertEquals(&amp;quot;lookup with key2&amp;quot;, VALUE2, actualValue2);
&lt;br&gt;&amp;gt; &amp;nbsp;  }
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;  public void testLoadsObjectThatIsNotCachedWithMockito() {
&lt;br&gt;&amp;gt; &amp;nbsp;      Clock clock = mock(Clock.class);
&lt;br&gt;&amp;gt; &amp;nbsp;      ObjectLoader loader = mock(ObjectLoader.class, &amp;quot;loader&amp;quot;);
&lt;br&gt;&amp;gt; &amp;nbsp;      ReloadPolicy reloadPolicy = mock(ReloadPolicy.class);
&lt;br&gt;&amp;gt; &amp;nbsp;      TimedCache cache = new TimedCache(loader, clock, reloadPolicy);
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;      when(clock.time()).thenReturn(loadTime);
&lt;br&gt;&amp;gt; &amp;nbsp;      when(loader.load(eq(&amp;quot;key1&amp;quot;))).thenReturn(VALUE1);
&lt;br&gt;&amp;gt; &amp;nbsp;      when(loader.load(eq(&amp;quot;key2&amp;quot;))).thenReturn(VALUE2);
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;      Object actualValue1 = cache.lookup(&amp;quot;key1&amp;quot;);
&lt;br&gt;&amp;gt; &amp;nbsp;      Object actualValue2 = cache.lookup(&amp;quot;key2&amp;quot;);
&lt;br&gt;&amp;gt; &amp;nbsp;            verify(loader).load(&amp;quot;key1&amp;quot;);
&lt;br&gt;&amp;gt; &amp;nbsp;      verify(loader).load(&amp;quot;key2&amp;quot;);
&lt;br&gt;&amp;gt; &amp;nbsp;            verifyNoMoreInteractions(loader);
&lt;br&gt;&amp;gt; &amp;nbsp;      assertEquals(&amp;quot;lookup with key1&amp;quot;, VALUE1, actualValue1);
&lt;br&gt;&amp;gt; &amp;nbsp;      assertEquals(&amp;quot;lookup with key2&amp;quot;, VALUE2, actualValue2);
&lt;br&gt;&amp;gt; &amp;nbsp;  }
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; - Neil
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.natpryce.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.natpryce.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/jMock---User-f2665.html&quot; embed=&quot;fixTarget[2665]&quot; target=&quot;_top&quot; &gt;jMock - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Differences-between-jMock---Mockito-tp26023576p26055231.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26052709</id>
	<title>Re: Differences between jMock &amp; Mockito</title>
	<published>2009-10-25T15:56:17Z</published>
	<updated>2009-10-25T15:56:17Z</updated>
	<author>
		<name>Neil Swingler</name>
	</author>
	<content type="html">I have just given myself a 30 minute crash course in jmock2 by 
&lt;br&gt;converting one of jmock's very own unit tests to Mockito. OK I only 
&lt;br&gt;chose the first test but I think it gives a flavour of the differences. 
&lt;br&gt;The full compiling class is attached but here is the interesting bit. 
&lt;br&gt;Personally I would probably skip the verify steps in the mockito version 
&lt;br&gt;but kept them in for completeness.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; public void testLoadsObjectThatIsNotCachedWithJmock() {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Mockery context = new Mockery() {{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; setExpectationErrorTranslator(JUnit3ErrorTranslator.INSTANCE);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }};
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; final Clock clock = context.mock(Clock.class);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; final ObjectLoader loader = context.mock(ObjectLoader.class, 
&lt;br&gt;&amp;quot;loader&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ReloadPolicy reloadPolicy = context.mock(ReloadPolicy.class);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TimedCache cache = new TimedCache(loader, clock, reloadPolicy);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; context.checking(new Expectations() {{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; allowing (clock).time(); will(returnValue(loadTime));
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; oneOf (loader).load(&amp;quot;key1&amp;quot;); will(returnValue(VALUE1));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; oneOf (loader).load(&amp;quot;key2&amp;quot;); will(returnValue(VALUE2));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }});
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Object actualValue1 = cache.lookup(&amp;quot;key1&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Object actualValue2 = cache.lookup(&amp;quot;key2&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; context.assertIsSatisfied();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assertEquals(&amp;quot;lookup with key1&amp;quot;, VALUE1, actualValue1);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assertEquals(&amp;quot;lookup with key2&amp;quot;, VALUE2, actualValue2);
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; public void testLoadsObjectThatIsNotCachedWithMockito() {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Clock clock = mock(Clock.class);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ObjectLoader loader = mock(ObjectLoader.class, &amp;quot;loader&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ReloadPolicy reloadPolicy = mock(ReloadPolicy.class);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TimedCache cache = new TimedCache(loader, clock, reloadPolicy);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; when(clock.time()).thenReturn(loadTime);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; when(loader.load(eq(&amp;quot;key1&amp;quot;))).thenReturn(VALUE1);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; when(loader.load(eq(&amp;quot;key2&amp;quot;))).thenReturn(VALUE2);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Object actualValue1 = cache.lookup(&amp;quot;key1&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Object actualValue2 = cache.lookup(&amp;quot;key2&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; verify(loader).load(&amp;quot;key1&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; verify(loader).load(&amp;quot;key2&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; verifyNoMoreInteractions(loader);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assertEquals(&amp;quot;lookup with key1&amp;quot;, VALUE1, actualValue1);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assertEquals(&amp;quot;lookup with key2&amp;quot;, VALUE2, actualValue2);
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;- Neil
&lt;br&gt;&lt;br /&gt;/* &amp;nbsp;Copyright (c) 2000-2004 jMock.org
&lt;br&gt;&amp;nbsp;*/
&lt;br&gt;package org.jmock.example.timedcache;
&lt;br&gt;&lt;br&gt;import static org.mockito.Matchers.eq;
&lt;br&gt;import static org.mockito.Mockito.mock;
&lt;br&gt;import static org.mockito.Mockito.verify;
&lt;br&gt;import static org.mockito.Mockito.verifyNoMoreInteractions;
&lt;br&gt;import static org.mockito.Mockito.when;
&lt;br&gt;&lt;br&gt;import java.util.Calendar;
&lt;br&gt;import java.util.Date;
&lt;br&gt;&lt;br&gt;import junit.framework.TestCase;
&lt;br&gt;&lt;br&gt;import org.jmock.Expectations;
&lt;br&gt;import org.jmock.Mockery;
&lt;br&gt;import org.jmock.integration.junit3.JUnit3ErrorTranslator;
&lt;br&gt;&lt;br&gt;&lt;br&gt;public class TimedCacheTests extends TestCase {
&lt;br&gt;&amp;nbsp; &amp;nbsp; private Date loadTime = time(1);
&lt;br&gt;&amp;nbsp; &amp;nbsp; final Object VALUE1 = &amp;quot;value1&amp;quot;;
&lt;br&gt;&amp;nbsp; &amp;nbsp; final Object VALUE2 = &amp;quot;value2&amp;quot;;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; public void testLoadsObjectThatIsNotCachedWithJmock() {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Mockery context = new Mockery() {{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; setExpectationErrorTranslator(JUnit3ErrorTranslator.INSTANCE);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }};
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; final Clock clock = context.mock(Clock.class);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; final ObjectLoader loader = context.mock(ObjectLoader.class, &amp;quot;loader&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ReloadPolicy reloadPolicy = context.mock(ReloadPolicy.class);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TimedCache cache = new TimedCache(loader, clock, reloadPolicy);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; context.checking(new Expectations() {{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; allowing (clock).time(); will(returnValue(loadTime));
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; oneOf (loader).load(&amp;quot;key1&amp;quot;); will(returnValue(VALUE1));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; oneOf (loader).load(&amp;quot;key2&amp;quot;); will(returnValue(VALUE2));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }});
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Object actualValue1 = cache.lookup(&amp;quot;key1&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Object actualValue2 = cache.lookup(&amp;quot;key2&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; context.assertIsSatisfied();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assertEquals(&amp;quot;lookup with key1&amp;quot;, VALUE1, actualValue1);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assertEquals(&amp;quot;lookup with key2&amp;quot;, VALUE2, actualValue2);
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; public void testLoadsObjectThatIsNotCachedWithMockito() {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Clock clock = mock(Clock.class);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ObjectLoader loader = mock(ObjectLoader.class, &amp;quot;loader&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ReloadPolicy reloadPolicy = mock(ReloadPolicy.class);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TimedCache cache = new TimedCache(loader, clock, reloadPolicy);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; when(clock.time()).thenReturn(loadTime);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; when(loader.load(eq(&amp;quot;key1&amp;quot;))).thenReturn(VALUE1);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; when(loader.load(eq(&amp;quot;key2&amp;quot;))).thenReturn(VALUE2);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Object actualValue1 = cache.lookup(&amp;quot;key1&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Object actualValue2 = cache.lookup(&amp;quot;key2&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; verify(loader).load(&amp;quot;key1&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; verify(loader).load(&amp;quot;key2&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; verifyNoMoreInteractions(loader);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assertEquals(&amp;quot;lookup with key1&amp;quot;, VALUE1, actualValue1);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assertEquals(&amp;quot;lookup with key2&amp;quot;, VALUE2, actualValue2);
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; private Date time(int i) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Calendar calendar = Calendar.getInstance();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; calendar.clear();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; calendar.set(Calendar.DAY_OF_YEAR, i);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return calendar.getTime();
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;&lt;br /&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/jMock---User-f2665.html&quot; embed=&quot;fixTarget[2665]&quot; target=&quot;_top&quot; &gt;jMock - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Differences-between-jMock---Mockito-tp26023576p26052709.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26051793</id>
	<title>Re: Differences between jMock &amp; Mockito</title>
	<published>2009-10-25T14:03:47Z</published>
	<updated>2009-10-25T14:03:47Z</updated>
	<author>
		<name>Steve Freeman-2</name>
	</author>
	<content type="html">&amp;gt; I agree Nat. I'm just trying to counter the opinion that mockito &amp;nbsp;
&lt;br&gt;&amp;gt; will hide a bad design.
&lt;br&gt;&lt;br&gt;I would love to see if using mockito/jmock actually has any effect on &amp;nbsp;
&lt;br&gt;design. So far, I've peeked into as many as 3 codebases that use &amp;nbsp;
&lt;br&gt;mockito and not been hugely impressed with 2 of them (no, I don't have &amp;nbsp;
&lt;br&gt;any data for jmock).
&lt;br&gt;&lt;br&gt;It would be neat, for example, to run Keith's measure on different &amp;nbsp;
&lt;br&gt;projects and see if there's a significant difference.
&lt;br&gt;&lt;br&gt;S.
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/jMock---User-f2665.html&quot; embed=&quot;fixTarget[2665]&quot; target=&quot;_top&quot; &gt;jMock - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Differences-between-jMock---Mockito-tp26023576p26051793.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26051240</id>
	<title>Re: Differences between jMock &amp; Mockito</title>
	<published>2009-10-25T13:01:17Z</published>
	<updated>2009-10-25T13:01:17Z</updated>
	<author>
		<name>Nat Pryce</name>
	</author>
	<content type="html">2009/10/25 &amp;quot;Günther, Rene - Innflow AG&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26051240&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;rene.guenther@...&lt;/a&gt;&amp;gt;:
&lt;br&gt;&amp;gt; Thats interesting. Normally that applies to our objects as well (one or two
&lt;br&gt;&amp;gt; mocks). But our main object (a financial document) has references to almost
&lt;br&gt;&amp;gt; all other objects. The documentManager is interacting with 10-15 other
&lt;br&gt;&amp;gt; managers (to be mocked). Would you recommend to split that manager? Maybe
&lt;br&gt;&amp;gt; you know of some pattern which would help simplify that manager?
&lt;br&gt;&lt;br&gt;I'd consider the fact that it has 10 to 15 dependencies a smell. Also
&lt;br&gt;a smell is the fact that it has a vague word like &amp;quot;manager&amp;quot; in its
&lt;br&gt;name. &amp;nbsp;I'd try to look at what its responsibilities are and divide it
&lt;br&gt;up into objects that perform those responsibilities and are have more
&lt;br&gt;evocative / concrete names.
&lt;br&gt;&lt;br&gt;Exactly what patterns I'd use I cannot say without knowing about the
&lt;br&gt;system and domain.
&lt;br&gt;&lt;br&gt;--Nat
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.natpryce.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.natpryce.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/jMock---User-f2665.html&quot; embed=&quot;fixTarget[2665]&quot; target=&quot;_top&quot; &gt;jMock - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Differences-between-jMock---Mockito-tp26023576p26051240.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26050319</id>
	<title>AW: Differences between jMock &amp; Mockito</title>
	<published>2009-10-25T11:10:56Z</published>
	<updated>2009-10-25T11:10:56Z</updated>
	<author>
		<name>Rene Guenther</name>
	</author>
	<content type="html">Thats interesting. Normally that applies to our objects as well (one or two
&lt;br&gt;mocks). But our main object (a financial document) has references to almost
&lt;br&gt;all other objects. The documentManager is interacting with 10-15 other
&lt;br&gt;managers (to be mocked). Would you recommend to split that manager? Maybe
&lt;br&gt;you know of some pattern which would help simplify that manager?
&lt;br&gt;&lt;br&gt;Thanks
&lt;br&gt;Rene
&lt;br&gt;&lt;br&gt;-----Ursprüngliche Nachricht-----
&lt;br&gt;Von: Nat Pryce [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26050319&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;nat.pryce@...&lt;/a&gt;] 
&lt;br&gt;Gesendet: Sonntag, 25. Oktober 2009 15:01
&lt;br&gt;An: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26050319&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;user@...&lt;/a&gt;
&lt;br&gt;Betreff: Re: [jmock-user] Differences between jMock &amp; Mockito
&lt;br&gt;&lt;br&gt;2009/10/24 Neil Swingler &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26050319&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;neil@...&lt;/a&gt;&amp;gt;:
&lt;br&gt;&amp;gt; setting up a lot of mocks is still a pain whichever framework you use.
&lt;br&gt;&lt;br&gt;Our opinion (and jMock is 'opinionated software') is that is your
&lt;br&gt;tests telling you that your object under test has too many
&lt;br&gt;dependencies. &amp;nbsp;A test shouldn't create more than a handful of mocks.
&lt;br&gt;Most tests I see create one or two.
&lt;br&gt;&lt;br&gt;--Nat
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.natpryce.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.natpryce.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/jMock---User-f2665.html&quot; embed=&quot;fixTarget[2665]&quot; target=&quot;_top&quot; &gt;jMock - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Differences-between-jMock---Mockito-tp26023576p26050319.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26049245</id>
	<title>Re: Differences between jMock &amp; Mockito</title>
	<published>2009-10-25T09:19:39Z</published>
	<updated>2009-10-25T09:19:39Z</updated>
	<author>
		<name>Nat Pryce</name>
	</author>
	<content type="html">Mockito won't hide that, I agree.
&lt;br&gt;&lt;br&gt;But it will hide complex inter-object protocols by, for example,
&lt;br&gt;hiding that there are lots of get-calls between objects.
&lt;br&gt;&lt;br&gt;--Nat
&lt;br&gt;&lt;br&gt;2009/10/25 Neil Swingler &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26049245&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;neil@...&lt;/a&gt;&amp;gt;:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I agree Nat. I'm just trying to counter the opinion that mockito will hide a
&lt;br&gt;&amp;gt; bad design.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; - Neil
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On 25 Oct 2009, at 15:00, Nat Pryce &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26049245&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;nat.pryce@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; 2009/10/24 Neil Swingler &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26049245&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;neil@...&lt;/a&gt;&amp;gt;:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; setting up a lot of mocks is still a pain whichever framework you use.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Our opinion (and jMock is 'opinionated software') is that is your
&lt;br&gt;&amp;gt;&amp;gt; tests telling you that your object under test has too many
&lt;br&gt;&amp;gt;&amp;gt; dependencies.  A test shouldn't create more than a handful of mocks.
&lt;br&gt;&amp;gt;&amp;gt; Most tests I see create one or two.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; --Nat
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; --
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://www.natpryce.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.natpryce.com&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt; To unsubscribe from this list, please visit:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;   &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe from this list, please visit:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;   &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.natpryce.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.natpryce.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/jMock---User-f2665.html&quot; embed=&quot;fixTarget[2665]&quot; target=&quot;_top&quot; &gt;jMock - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Differences-between-jMock---Mockito-tp26023576p26049245.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26048637</id>
	<title>Re: Differences between jMock &amp; Mockito</title>
	<published>2009-10-25T07:13:06Z</published>
	<updated>2009-10-25T07:13:06Z</updated>
	<author>
		<name>Neil Swingler</name>
	</author>
	<content type="html">I agree Nat. I'm just trying to counter the opinion that mockito will &amp;nbsp;
&lt;br&gt;hide a bad design.
&lt;br&gt;&lt;br&gt;- Neil
&lt;br&gt;&lt;br&gt;On 25 Oct 2009, at 15:00, Nat Pryce &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26048637&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;nat.pryce@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 2009/10/24 Neil Swingler &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26048637&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;neil@...&lt;/a&gt;&amp;gt;:
&lt;br&gt;&amp;gt;&amp;gt; setting up a lot of mocks is still a pain whichever framework you &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; use.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Our opinion (and jMock is 'opinionated software') is that is your
&lt;br&gt;&amp;gt; tests telling you that your object under test has too many
&lt;br&gt;&amp;gt; dependencies. &amp;nbsp;A test shouldn't create more than a handful of mocks.
&lt;br&gt;&amp;gt; Most tests I see create one or two.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --Nat
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; -- 
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.natpryce.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.natpryce.com&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe from this list, please visit:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/jMock---User-f2665.html&quot; embed=&quot;fixTarget[2665]&quot; target=&quot;_top&quot; &gt;jMock - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Differences-between-jMock---Mockito-tp26023576p26048637.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26049389</id>
	<title>Re: Differences between jMock &amp; Mockito</title>
	<published>2009-10-25T07:00:55Z</published>
	<updated>2009-10-25T07:00:55Z</updated>
	<author>
		<name>Nat Pryce</name>
	</author>
	<content type="html">2009/10/24 Neil Swingler &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26049389&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;neil@...&lt;/a&gt;&amp;gt;:
&lt;br&gt;&amp;gt; setting up a lot of mocks is still a pain whichever framework you use.
&lt;br&gt;&lt;br&gt;Our opinion (and jMock is 'opinionated software') is that is your
&lt;br&gt;tests telling you that your object under test has too many
&lt;br&gt;dependencies. &amp;nbsp;A test shouldn't create more than a handful of mocks.
&lt;br&gt;Most tests I see create one or two.
&lt;br&gt;&lt;br&gt;--Nat
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.natpryce.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.natpryce.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/jMock---User-f2665.html&quot; embed=&quot;fixTarget[2665]&quot; target=&quot;_top&quot; &gt;jMock - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Differences-between-jMock---Mockito-tp26023576p26049389.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26043263</id>
	<title>Re: Differences between jMock &amp; Mockito</title>
	<published>2009-10-24T14:29:52Z</published>
	<updated>2009-10-24T14:29:52Z</updated>
	<author>
		<name>Steve Freeman-2</name>
	</author>
	<content type="html">&lt;div class='shrinkable-quote'&gt;&amp;gt; There is, of course, a halfway ground to consider. &amp;nbsp;When I'm working &amp;nbsp;
&lt;br&gt;&amp;gt; in .NET, I tend to use Rhino.Mocks. &amp;nbsp;This has the interesting &amp;nbsp;
&lt;br&gt;&amp;gt; facility that if you call MockRepository.CreateMock to create your &amp;nbsp;
&lt;br&gt;&amp;gt; mock, you end up with something that behaves like JMock does, but if &amp;nbsp;
&lt;br&gt;&amp;gt; you call MockRepository.DynamicMock you end up with a stub &amp;nbsp;
&lt;br&gt;&amp;gt; implementation that ignores unexpected calls, or you can use &amp;nbsp;
&lt;br&gt;&amp;gt; MockRepository.PartialMock when mocking a concrete class to get a &amp;nbsp;
&lt;br&gt;&amp;gt; stub that passes calls to the original implementation by default. &amp;nbsp; 
&lt;br&gt;&amp;gt; It's still a &amp;quot;set expectations before running your code&amp;quot; style of &amp;nbsp;
&lt;br&gt;&amp;gt; interaction rather than the &amp;quot;verify what happened after you've done &amp;nbsp;
&lt;br&gt;&amp;gt; it&amp;quot; style you use with Mockito, but it's a little more flexible than &amp;nbsp;
&lt;br&gt;&amp;gt; JMock.
&lt;/div&gt;&lt;br&gt;actually, jMock will do that with the allowing() clause.
&lt;br&gt;&lt;br&gt;&amp;gt; (The API's also a little cleaner, but that's because .NET allows a &amp;nbsp;
&lt;br&gt;&amp;gt; cleaner API than Java does, largely due to having proper generic &amp;nbsp;
&lt;br&gt;&amp;gt; types)
&lt;br&gt;&lt;br&gt;Last time I looked at it, I think Rhino could have had a much cleaner &amp;nbsp;
&lt;br&gt;API. They have a lot more room to manoeuvre than we do.
&lt;br&gt;&lt;br&gt;S.
&lt;br&gt;&lt;br&gt;Steve Freeman
&lt;br&gt;&lt;br&gt;Winner of the Agile Alliance Gordon Pask award 2006
&lt;br&gt;Book: &lt;a href=&quot;http://www.growing-object-oriented-software.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.growing-object-oriented-software.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;+44 (0) 797 179 4105
&lt;br&gt;M3P Limited. &amp;nbsp;&lt;a href=&quot;http://www.m3p.co.uk&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.m3p.co.uk&lt;/a&gt;&lt;br&gt;Registered office. 2 Church Street, Burnham, Bucks, SL1 7HZ.
&lt;br&gt;Company registered in England &amp; Wales. Number 03689627
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/jMock---User-f2665.html&quot; embed=&quot;fixTarget[2665]&quot; target=&quot;_top&quot; &gt;jMock - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Differences-between-jMock---Mockito-tp26023576p26043263.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26043249</id>
	<title>Re: Differences between jMock &amp; Mockito</title>
	<published>2009-10-24T14:27:36Z</published>
	<updated>2009-10-24T14:27:36Z</updated>
	<author>
		<name>Steve Freeman-2</name>
	</author>
	<content type="html">Interesting. Maybe I'm just used to it, but I like having the protocol &amp;nbsp;
&lt;br&gt;between neighbours made explicit, rather than implied.
&lt;br&gt;&lt;br&gt;S.
&lt;br&gt;&lt;br&gt;&amp;gt; I'm now using mockito after using jmock1.0 for a fair while. I do &amp;nbsp;
&lt;br&gt;&amp;gt; prefer the &amp;nbsp;brevity of mockito and doing verifications after &amp;nbsp;
&lt;br&gt;&amp;gt; invocation seems more natural than setting expectations in advance. &amp;nbsp;
&lt;br&gt;&amp;gt; Mockito may make a bad design a bit easier to test than jmock but &amp;nbsp;
&lt;br&gt;&amp;gt; setting up a lot of mocks is still a pain whichever framework you use.
&lt;br&gt;&lt;br&gt;Steve Freeman
&lt;br&gt;&lt;br&gt;Winner of the Agile Alliance Gordon Pask award 2006
&lt;br&gt;Book: &lt;a href=&quot;http://www.growing-object-oriented-software.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.growing-object-oriented-software.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;+44 (0) 797 179 4105
&lt;br&gt;M3P Limited. &amp;nbsp;&lt;a href=&quot;http://www.m3p.co.uk&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.m3p.co.uk&lt;/a&gt;&lt;br&gt;Registered office. 2 Church Street, Burnham, Bucks, SL1 7HZ.
&lt;br&gt;Company registered in England &amp; Wales. Number 03689627
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/jMock---User-f2665.html&quot; embed=&quot;fixTarget[2665]&quot; target=&quot;_top&quot; &gt;jMock - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Differences-between-jMock---Mockito-tp26023576p26043249.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26040033</id>
	<title>Re: Differences between jMock &amp; Mockito</title>
	<published>2009-10-24T08:27:01Z</published>
	<updated>2009-10-24T08:27:01Z</updated>
	<author>
		<name>Neil Swingler</name>
	</author>
	<content type="html">I'm now using mockito after using jmock1.0 for a fair while. I do &amp;nbsp;
&lt;br&gt;prefer the &amp;nbsp;brevity of mockito and doing verifications after &amp;nbsp;
&lt;br&gt;invocation seems more natural than setting expectations in advance. &amp;nbsp;
&lt;br&gt;Mockito may make a bad design a bit easier to test than jmock but &amp;nbsp;
&lt;br&gt;setting up a lot of mocks is still a pain whichever framework you use.
&lt;br&gt;&lt;br&gt;- Neil
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;On 24 Oct 2009, at 12:53, Nat Pryce &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26040033&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;nat.pryce@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi James. The only comparison I know of is
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://rrees.wordpress.com/2009/04/12/three-little-mockers/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://rrees.wordpress.com/2009/04/12/three-little-mockers/&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --Nat
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Friday, October 23, 2009, James Mead &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26040033&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jamesmead44@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; I'm interested in the pros &amp; cons of jMock versus Mockito? Is the
&lt;br&gt;&amp;gt;&amp;gt; choice just a matter of personal taste or are there more fundamental
&lt;br&gt;&amp;gt;&amp;gt; issues I should be aware of?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; A comment [1] by Steve on Dan North's blog seems to suggest that &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; jMock
&lt;br&gt;&amp;gt;&amp;gt; will become syntactically noisy when your design is poor, but that
&lt;br&gt;&amp;gt;&amp;gt; Mockito will stay syntactically quiet and allow you to get away it.
&lt;br&gt;&amp;gt;&amp;gt; Have I understood that correctly? Can you elaborate? Do you have any
&lt;br&gt;&amp;gt;&amp;gt; concrete examples?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Thanks, James.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; [1] &lt;a href=&quot;http://dannorth.net/2008/09/the-end-of-endotesting#comment-17523&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://dannorth.net/2008/09/the-end-of-endotesting#comment-17523&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt; To unsubscribe from this list, please visit:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; -- 
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.natpryce.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.natpryce.com&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe from this list, please visit:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/jMock---User-f2665.html&quot; embed=&quot;fixTarget[2665]&quot; target=&quot;_top&quot; &gt;jMock - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Differences-between-jMock---Mockito-tp26023576p26040033.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26038513</id>
	<title>Re: Differences between jMock &amp; Mockito</title>
	<published>2009-10-24T05:19:07Z</published>
	<updated>2009-10-24T05:19:07Z</updated>
	<author>
		<name>Julian Hall-2</name>
	</author>
	<content type="html">isaiah perumalla wrote:
&lt;br&gt;&amp;gt; Jmock will highlight badly designed communication protocols between 
&lt;br&gt;&amp;gt; object under test and its collaborators. On the other hand, frameworks 
&lt;br&gt;&amp;gt; like mockito by default ignore all calls between the object under test 
&lt;br&gt;&amp;gt; and it's mocked collaborator(s) and only verifies calls you explicitly 
&lt;br&gt;&amp;gt; specify.
&lt;br&gt;There is, of course, a halfway ground to consider. &amp;nbsp;When I'm working in 
&lt;br&gt;.NET, I tend to use Rhino.Mocks. &amp;nbsp;This has the interesting facility that 
&lt;br&gt;if you call MockRepository.CreateMock to create your mock, you end up 
&lt;br&gt;with something that behaves like JMock does, but if you call 
&lt;br&gt;MockRepository.DynamicMock you end up with a stub implementation that 
&lt;br&gt;ignores unexpected calls, or you can use MockRepository.PartialMock when 
&lt;br&gt;mocking a concrete class to get a stub that passes calls to the original 
&lt;br&gt;implementation by default. &amp;nbsp;It's still a &amp;quot;set expectations before 
&lt;br&gt;running your code&amp;quot; style of interaction rather than the &amp;quot;verify what 
&lt;br&gt;happened after you've done it&amp;quot; style you use with Mockito, but it's a 
&lt;br&gt;little more flexible than JMock.
&lt;br&gt;&lt;br&gt;(The API's also a little cleaner, but that's because .NET allows a 
&lt;br&gt;cleaner API than Java does, largely due to having proper generic types)
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/jMock---User-f2665.html&quot; embed=&quot;fixTarget[2665]&quot; target=&quot;_top&quot; &gt;jMock - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Differences-between-jMock---Mockito-tp26023576p26038513.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26037924</id>
	<title>Re: Differences between jMock &amp; Mockito</title>
	<published>2009-10-24T03:53:53Z</published>
	<updated>2009-10-24T03:53:53Z</updated>
	<author>
		<name>Nat Pryce</name>
	</author>
	<content type="html">Hi James. The only comparison I know of is
&lt;br&gt;&lt;a href=&quot;http://rrees.wordpress.com/2009/04/12/three-little-mockers/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://rrees.wordpress.com/2009/04/12/three-little-mockers/&lt;/a&gt;&lt;br&gt;&lt;br&gt;--Nat
&lt;br&gt;&lt;br&gt;On Friday, October 23, 2009, James Mead &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26037924&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jamesmead44@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I'm interested in the pros &amp; cons of jMock versus Mockito? Is the
&lt;br&gt;&amp;gt; choice just a matter of personal taste or are there more fundamental
&lt;br&gt;&amp;gt; issues I should be aware of?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; A comment [1] by Steve on Dan North's blog seems to suggest that jMock
&lt;br&gt;&amp;gt; will become syntactically noisy when your design is poor, but that
&lt;br&gt;&amp;gt; Mockito will stay syntactically quiet and allow you to get away it.
&lt;br&gt;&amp;gt; Have I understood that correctly? Can you elaborate? Do you have any
&lt;br&gt;&amp;gt; concrete examples?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks, James.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; [1] &lt;a href=&quot;http://dannorth.net/2008/09/the-end-of-endotesting#comment-17523&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://dannorth.net/2008/09/the-end-of-endotesting#comment-17523&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe from this list, please visit:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;   &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.natpryce.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.natpryce.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/jMock---User-f2665.html&quot; embed=&quot;fixTarget[2665]&quot; target=&quot;_top&quot; &gt;jMock - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Differences-between-jMock---Mockito-tp26023576p26037924.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26032773</id>
	<title>Re: Mocking constructor - is it possible?</title>
	<published>2009-10-23T13:26:35Z</published>
	<updated>2009-10-23T13:26:35Z</updated>
	<author>
		<name>Steve Freeman-2</name>
	</author>
	<content type="html">We can't do that. We usually find that whatever made us think of doing &amp;nbsp;
&lt;br&gt;so is not the best design, and try another direction. If you could &amp;nbsp;
&lt;br&gt;give us a more concrete example, we might be able to help you better.
&lt;br&gt;&lt;br&gt;S.
&lt;br&gt;&lt;br&gt;On 23 Oct 2009, at 14:32, Hr Borisov wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I have the following question: When we have a local object for a &amp;nbsp;
&lt;br&gt;&amp;gt; method and we
&lt;br&gt;&amp;gt; invoke a constructor for that object, can we catch the invocation to &amp;nbsp;
&lt;br&gt;&amp;gt; the
&lt;br&gt;&amp;gt; constructor and mock the creation of the object?
&lt;br&gt;&amp;gt; I know that I can make a mock of the invocation of some method in a &amp;nbsp;
&lt;br&gt;&amp;gt; class not
&lt;br&gt;&amp;gt; depending on the reference but it would not help me. For example if &amp;nbsp;
&lt;br&gt;&amp;gt; I want to
&lt;br&gt;&amp;gt; mock isEmpty() method of some collection object I could not because &amp;nbsp;
&lt;br&gt;&amp;gt; I can't
&lt;br&gt;&amp;gt; calculate the consecutive number of the invocation that is important &amp;nbsp;
&lt;br&gt;&amp;gt; to me.
&lt;br&gt;&amp;gt; Thanks in advance!
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Example:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Class A {
&lt;br&gt;&amp;gt; &amp;nbsp;void someMethod() {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;B ref = new B();
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;if (ref.doSomething() == 10) {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;// I want to get here by mocking ref
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;gt; &amp;nbsp;}
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Class B {
&lt;br&gt;&amp;gt; &amp;nbsp;int doSomething() {
&lt;br&gt;&amp;gt; &amp;nbsp; ...
&lt;br&gt;&amp;gt; &amp;nbsp;}
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;Steve Freeman
&lt;br&gt;&lt;br&gt;Winner of the Agile Alliance Gordon Pask award 2006
&lt;br&gt;Book: &lt;a href=&quot;http://www.growing-object-oriented-software.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.growing-object-oriented-software.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;+44 (0) 797 179 4105
&lt;br&gt;M3P Limited. &amp;nbsp;&lt;a href=&quot;http://www.m3p.co.uk&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.m3p.co.uk&lt;/a&gt;&lt;br&gt;Registered office. 2 Church Street, Burnham, Bucks, SL1 7HZ.
&lt;br&gt;Company registered in England &amp; Wales. Number 03689627
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/jMock---User-f2665.html&quot; embed=&quot;fixTarget[2665]&quot; target=&quot;_top&quot; &gt;jMock - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Mocking-constructor---is-it-possible--tp26026019p26032773.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26029779</id>
	<title>Re: Differences between jMock &amp; Mockito</title>
	<published>2009-10-23T09:48:03Z</published>
	<updated>2009-10-23T09:48:03Z</updated>
	<author>
		<name>Isaiah</name>
	</author>
	<content type="html">I think there are two fundamental issues, The original intent of mocks was to use it as a tool to discover roles, and design the communication protocols between objects. &lt;br&gt;Jmock  is better tool if this is how you intended to use mock object. Jmock will highlight badly designed communication protocols between object under test and its collaborators. On the other hand, frameworks like mockito by default &lt;span&gt;ignore all calls between the object under test and it&amp;#39;s mocked collaborator(s) and only verifies calls you explicitly specify. &lt;/span&gt;If the communication protocol between object undertest and its collaborators is poorly deigned (very chatty, exposing implementation details etc) a framework like mokito will not highlight this, it would silence these issues. In jmock, the test would become very brittle and very difficult to write.&lt;br&gt;
&lt;br&gt;The other fundamental issue is jmock will get you started off by thinking about the contracts or communication protocols between objects, because you have to specify the expeceted messages before you exercies the object under test.&lt;br&gt;
&lt;br&gt;jmock is highly opiniated tool specifically designed as a tool to design object protocols and discover role interfaces, mockito is designed to simply isolate external dependecies and make testing easier.&lt;br&gt;&lt;br&gt;Cheers&lt;br&gt;
Isaiah&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Fri, Oct 23, 2009 at 10:47 AM, James Mead &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26029779&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jamesmead44@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;

I&amp;#39;m interested in the pros &amp;amp; cons of jMock versus Mockito? Is the&lt;br&gt;
choice just a matter of personal taste or are there more fundamental&lt;br&gt;
issues I should be aware of?&lt;br&gt;
&lt;br&gt;
A comment [1] by Steve on Dan North&amp;#39;s blog seems to suggest that jMock&lt;br&gt;
will become syntactically noisy when your design is poor, but that&lt;br&gt;
Mockito will stay syntactically quiet and allow you to get away it.&lt;br&gt;
Have I understood that correctly? Can you elaborate? Do you have any&lt;br&gt;
concrete examples?&lt;br&gt;
&lt;br&gt;
Thanks, James.&lt;br&gt;
&lt;br&gt;
[1] &lt;a href=&quot;http://dannorth.net/2008/09/the-end-of-endotesting#comment-17523&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://dannorth.net/2008/09/the-end-of-endotesting#comment-17523&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
---------------------------------------------------------------------&lt;br&gt;
To unsubscribe from this list, please visit:&lt;br&gt;
&lt;br&gt;
    &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;br clear=&quot;all&quot;&gt;&lt;br&gt;-- &lt;br&gt;Isaiah Perumalla&lt;br&gt;
&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/jMock---User-f2665.html&quot; embed=&quot;fixTarget[2665]&quot; target=&quot;_top&quot; &gt;jMock - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Differences-between-jMock---Mockito-tp26023576p26029779.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26026019</id>
	<title>Mocking constructor - is it possible?</title>
	<published>2009-10-23T05:32:34Z</published>
	<updated>2009-10-23T05:32:34Z</updated>
	<author>
		<name>Hr Borisov</name>
	</author>
	<content type="html">I have the following question: When we have a local object for a method and we
&lt;br&gt;invoke a constructor for that object, can we catch the invocation to the
&lt;br&gt;constructor and mock the creation of the object?
&lt;br&gt;I know that I can make a mock of the invocation of some method in a class not
&lt;br&gt;depending on the reference but it would not help me. For example if I want to
&lt;br&gt;mock isEmpty() method of some collection object I could not because I can't
&lt;br&gt;calculate the consecutive number of the invocation that is important to me.
&lt;br&gt;Thanks in advance!
&lt;br&gt;&lt;br&gt;Example:
&lt;br&gt;&lt;br&gt;Class A {
&lt;br&gt;&amp;nbsp; void someMethod() {
&lt;br&gt;&amp;nbsp; &amp;nbsp; B ref = new B();
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; if (ref.doSomething() == 10) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; // I want to get here by mocking ref
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; }
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;Class B {
&lt;br&gt;&amp;nbsp; int doSomething() {
&lt;br&gt;&amp;nbsp; &amp;nbsp;...
&lt;br&gt;&amp;nbsp; }
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/jMock---User-f2665.html&quot; embed=&quot;fixTarget[2665]&quot; target=&quot;_top&quot; &gt;jMock - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Mocking-constructor---is-it-possible--tp26026019p26026019.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26023576</id>
	<title>Differences between jMock &amp; Mockito</title>
	<published>2009-10-23T02:47:56Z</published>
	<updated>2009-10-23T02:47:56Z</updated>
	<author>
		<name>floehopper</name>
	</author>
	<content type="html">I'm interested in the pros &amp; cons of jMock versus Mockito? Is the
&lt;br&gt;choice just a matter of personal taste or are there more fundamental
&lt;br&gt;issues I should be aware of?
&lt;br&gt;&lt;br&gt;A comment [1] by Steve on Dan North's blog seems to suggest that jMock
&lt;br&gt;will become syntactically noisy when your design is poor, but that
&lt;br&gt;Mockito will stay syntactically quiet and allow you to get away it.
&lt;br&gt;Have I understood that correctly? Can you elaborate? Do you have any
&lt;br&gt;concrete examples?
&lt;br&gt;&lt;br&gt;Thanks, James.
&lt;br&gt;&lt;br&gt;[1] &lt;a href=&quot;http://dannorth.net/2008/09/the-end-of-endotesting#comment-17523&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://dannorth.net/2008/09/the-end-of-endotesting#comment-17523&lt;/a&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/jMock---User-f2665.html&quot; embed=&quot;fixTarget[2665]&quot; target=&quot;_top&quot; &gt;jMock - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Differences-between-jMock---Mockito-tp26023576p26023576.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26016581</id>
	<title>Re: Avoiding call to Java Collection classes</title>
	<published>2009-10-22T13:22:30Z</published>
	<updated>2009-10-22T13:22:30Z</updated>
	<author>
		<name>Nat Pryce</name>
	</author>
	<content type="html">Without seeing the code it's almost impossible to tell.
&lt;br&gt;&lt;br&gt;Does the class you're trying to mock have final methods? &amp;nbsp;If so, make
&lt;br&gt;them non-final.
&lt;br&gt;&lt;br&gt;--Nat
&lt;br&gt;&lt;br&gt;2009/10/22 Sam &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26016581&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mail@...&lt;/a&gt;&amp;gt;:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Given the stack trace below, how can I avoid the call to Arrays.mergeSort()?
&lt;br&gt;&amp;gt; I'm using 'allowing(arrays)' but that doesn't prevent the comparison of segment1
&lt;br&gt;&amp;gt; to segment2 which are my explicit mocks.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Many thanks,
&lt;br&gt;&amp;gt; Sam
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; junit.framework.AssertionFailedError: unexpected invocation:
&lt;br&gt;&amp;gt; segment1.compareTo(&amp;lt;segment2&amp;gt;)
&lt;br&gt;&amp;gt; expectations:
&lt;br&gt;&amp;gt;  allowed, never invoked: arrays.&amp;lt;any method&amp;gt;(&amp;lt;any parameters&amp;gt;); returns a
&lt;br&gt;&amp;gt; default value
&lt;br&gt;&amp;gt; what happened before this: nothing!
&lt;br&gt;&amp;gt;        at org.jmock.internal.InvocationDispatcher.
&lt;br&gt;&amp;gt; dispatch(InvocationDispatcher.java:56)
&lt;br&gt;&amp;gt;        at org.jmock.Mockery.dispatch(Mockery.java:218)
&lt;br&gt;&amp;gt;        at org.jmock.Mockery.access$000(Mockery.java:43)
&lt;br&gt;&amp;gt;        at org.jmock.Mockery$MockObject.invoke(Mockery.java:258)
&lt;br&gt;&amp;gt;        at org.jmock.internal.InvocationDiverter.
&lt;br&gt;&amp;gt; invoke(InvocationDiverter.java:27)
&lt;br&gt;&amp;gt;        at org.jmock.internal.FakeObjectMethods.
&lt;br&gt;&amp;gt; invoke(FakeObjectMethods.java:38)
&lt;br&gt;&amp;gt;        at org.jmock.lib.legacy.ClassImposteriser$4.
&lt;br&gt;&amp;gt; invoke(ClassImposteriser.java:137)
&lt;br&gt;&amp;gt;        at
&lt;br&gt;&amp;gt; hot.biz.pgood.air.FlightSegmentJdo$$EnhancerByCGLIB$$c65fa396.
&lt;br&gt;&amp;gt; compareTo(&amp;lt;generated&amp;gt;)
&lt;br&gt;&amp;gt;        at java.util.Arrays.mergeSort(Arrays.java:1156)
&lt;br&gt;&amp;gt;        at java.util.Arrays.sort(Arrays.java:1080)
&lt;br&gt;&amp;gt;        at java.util.Collections.sort(Collections.java:117)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe from this list, please visit:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;    &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.natpryce.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.natpryce.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/jMock---User-f2665.html&quot; embed=&quot;fixTarget[2665]&quot; target=&quot;_top&quot; &gt;jMock - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Avoiding-call-to-Java-Collection-classes-tp26014996p26016581.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26014996</id>
	<title>Avoiding call to Java Collection classes</title>
	<published>2009-10-22T11:26:03Z</published>
	<updated>2009-10-22T11:26:03Z</updated>
	<author>
		<name>Sam-186</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;Given the stack trace below, how can I avoid the call to Arrays.mergeSort()?
&lt;br&gt;I'm using 'allowing(arrays)' but that doesn't prevent the comparison of segment1
&lt;br&gt;to segment2 which are my explicit mocks.
&lt;br&gt;&lt;br&gt;&lt;br&gt;Many thanks,
&lt;br&gt;Sam 
&lt;br&gt;&lt;br&gt;junit.framework.AssertionFailedError: unexpected invocation:
&lt;br&gt;segment1.compareTo(&amp;lt;segment2&amp;gt;)
&lt;br&gt;expectations:
&lt;br&gt;&amp;nbsp; allowed, never invoked: arrays.&amp;lt;any method&amp;gt;(&amp;lt;any parameters&amp;gt;); returns a
&lt;br&gt;default value
&lt;br&gt;what happened before this: nothing!
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at org.jmock.internal.InvocationDispatcher.
&lt;br&gt;dispatch(InvocationDispatcher.java:56)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at org.jmock.Mockery.dispatch(Mockery.java:218)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at org.jmock.Mockery.access$000(Mockery.java:43)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at org.jmock.Mockery$MockObject.invoke(Mockery.java:258)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at org.jmock.internal.InvocationDiverter.
&lt;br&gt;invoke(InvocationDiverter.java:27)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at org.jmock.internal.FakeObjectMethods.
&lt;br&gt;invoke(FakeObjectMethods.java:38)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at org.jmock.lib.legacy.ClassImposteriser$4.
&lt;br&gt;invoke(ClassImposteriser.java:137)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;hot.biz.pgood.air.FlightSegmentJdo$$EnhancerByCGLIB$$c65fa396.
&lt;br&gt;compareTo(&amp;lt;generated&amp;gt;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.util.Arrays.mergeSort(Arrays.java:1156)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.util.Arrays.sort(Arrays.java:1080)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.util.Collections.sort(Collections.java:117)
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/jMock---User-f2665.html&quot; embed=&quot;fixTarget[2665]&quot; target=&quot;_top&quot; &gt;jMock - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Avoiding-call-to-Java-Collection-classes-tp26014996p26014996.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26014853</id>
	<title>Re: Error attempting to mock concrete class</title>
	<published>2009-10-22T11:21:21Z</published>
	<updated>2009-10-22T11:21:21Z</updated>
	<author>
		<name>Sam-186</name>
	</author>
	<content type="html">Issue resolved after much class path tweeking. 
&lt;br&gt;Thanks.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/jMock---User-f2665.html&quot; embed=&quot;fixTarget[2665]&quot; target=&quot;_top&quot; &gt;jMock - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Error-attempting-to-mock-concrete-class-tp25724841p26014853.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25860095</id>
	<title>Re: Error attempting to mock concrete class</title>
	<published>2009-10-12T10:39:08Z</published>
	<updated>2009-10-12T10:39:08Z</updated>
	<author>
		<name>Sam-186</name>
	</author>
	<content type="html">Ignat Zapolsky &amp;lt;izapolsky@...&amp;gt; writes:
&lt;br&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Could you please include full text of test fixture ?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;Hi Ignat,
&lt;br&gt;&lt;br&gt;Thanks for your reply. A class as simple as the following generates the error.
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Sam
&lt;br&gt;&lt;br&gt;&lt;br&gt;package biz.pgood.air;
&lt;br&gt;&lt;br&gt;import org.jmock.integration.junit3.MockObjectTestCase;
&lt;br&gt;import org.jmock.lib.legacy.ClassImposteriser;
&lt;br&gt;&lt;br&gt;import java.util.logging.Logger;
&lt;br&gt;&lt;br&gt;import j2ee.ClientServices;
&lt;br&gt;import biz.domain.fn.Money;
&lt;br&gt;&lt;br&gt;/**
&lt;br&gt;&amp;nbsp;*/
&lt;br&gt;public class AirCommissionCalculatorTest extends MockObjectTestCase {
&lt;br&gt;&amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; setImposteriser(ClassImposteriser.INSTANCE); &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; public void testSomething() {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Logger log = mock(Logger.class);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AirComissionAndCM_Calculator.doSomething(log);
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Sam wrote:
&lt;br&gt;&amp;gt; &amp;gt; Sam&amp;lt;mail@...&amp;gt; &amp;nbsp;writes:
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; I'm receiving the error below while attempting to mock java.util.Logger :
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; java.lang.NullPointerException
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; at net.sf.cglib.proxy.EnhancerEmitter$4.getMethods
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; (EnhancerEmitter.java:407)
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; at net.sf.cglib.proxy.NoOpGenerator.generate
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; (NoOpGenerator.java:69)
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; at net.sf.cglib.proxy.EnhancerEmitter.emitMethods
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Error received while attempting to mock concrete classes.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Specifically, adding the following lines to my test class generates the error
&lt;br&gt;&amp;gt; &amp;gt; detailed in my previous post:
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; {
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;setImposteriser(ClassImposteriser.INSTANCE);
&lt;br&gt;&amp;gt; &amp;gt; }
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Surely I can't be the only person to have run into this issue?
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Any input (I mean it, any!) would be appreciated.
&lt;br&gt;&amp;gt; &amp;gt; -Sam
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; &amp;gt; To unsubscribe from this list, please visit:
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe from this list, please visit:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/jMock---User-f2665.html&quot; embed=&quot;fixTarget[2665]&quot; target=&quot;_top&quot; &gt;jMock - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Error-attempting-to-mock-concrete-class-tp25724841p25860095.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25831706</id>
	<title>Re: Thoughts on jMock and multithreading?</title>
	<published>2009-10-10T00:20:09Z</published>
	<updated>2009-10-10T00:20:09Z</updated>
	<author>
		<name>Nat Pryce</name>
	</author>
	<content type="html">You're not using the thread-support classes in the new release
&lt;br&gt;candidate. &amp;nbsp;You need to create a Synchroniser and set it as the
&lt;br&gt;threading policy of the Mockery.
&lt;br&gt;&lt;br&gt;On Saturday, October 10, 2009, Julian Hall &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25831706&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jules@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Nat Pryce wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The API in the current release candidate is close to finalised. I
&lt;br&gt;&amp;gt; can't forsee any major changes.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I guess the important question is where do *you* (jmock users) find
&lt;br&gt;&amp;gt; inadequate or cumbersome. Speak now or forever hold your peace!
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; One thing that bugs me.  Consider the following test:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; @RunWith (JMock.class)
&lt;br&gt;&amp;gt; ...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;  @Test
&lt;br&gt;&amp;gt; &amp;nbsp;  public void mockingOtherThreads () throws Exception
&lt;br&gt;&amp;gt; &amp;nbsp;  {
&lt;br&gt;&amp;gt; &amp;nbsp;      final TestInterface mock = mockery.mock (TestInterface.class);
&lt;br&gt;&amp;gt; &amp;nbsp;      mockery.checking (new Expectations () {
&lt;br&gt;&amp;gt; &amp;nbsp;          {
&lt;br&gt;&amp;gt; &amp;nbsp;              one (mock).method ();
&lt;br&gt;&amp;gt; &amp;nbsp;          }
&lt;br&gt;&amp;gt; &amp;nbsp;      });
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;      Thread t = new Thread () {
&lt;br&gt;&amp;gt; &amp;nbsp;          @Override
&lt;br&gt;&amp;gt; &amp;nbsp;          public void run ()
&lt;br&gt;&amp;gt; &amp;nbsp;          {
&lt;br&gt;&amp;gt; &amp;nbsp;              mock.method ();
&lt;br&gt;&amp;gt; &amp;nbsp;              mock.otherMethod ();
&lt;br&gt;&amp;gt; &amp;nbsp;          }
&lt;br&gt;&amp;gt; &amp;nbsp;      };
&lt;br&gt;&amp;gt; &amp;nbsp;      t.start ();
&lt;br&gt;&amp;gt; &amp;nbsp;      t.join ();
&lt;br&gt;&amp;gt; &amp;nbsp;  }
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; This test passes, despite the fact that the call to mock.otherMethod() is unexpected.  The test correctly catches the case where mock.method() is not called, but fails to detect inappropriate calls: a java.lang.AssertionError is thrown, but nothing is in place to catch it.  Ideally, I think this assertion error should be stored, and then rethrown by mockery.assertIsSatisfied().
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe from this list, please visit:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;  &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.natpryce.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.natpryce.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/jMock---User-f2665.html&quot; embed=&quot;fixTarget[2665]&quot; target=&quot;_top&quot; &gt;jMock - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Thoughts-on-jMock-and-multithreading--tp22264297p25831706.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25829134</id>
	<title>Re: Re: Thoughts on jMock and multithreading?</title>
	<published>2009-10-09T16:00:21Z</published>
	<updated>2009-10-09T16:00:21Z</updated>
	<author>
		<name>Julian Hall-2</name>
	</author>
	<content type="html">Nat Pryce wrote:
&lt;br&gt;&amp;gt; The API in the current release candidate is close to finalised. I
&lt;br&gt;&amp;gt; can't forsee any major changes.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I guess the important question is where do *you* (jmock users) find
&lt;br&gt;&amp;gt; inadequate or cumbersome. Speak now or forever hold your peace!
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;One thing that bugs me. &amp;nbsp;Consider the following test:
&lt;br&gt;&lt;br&gt;@RunWith (JMock.class)
&lt;br&gt;...
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; @Test
&lt;br&gt;&amp;nbsp; &amp;nbsp; public void mockingOtherThreads () throws Exception
&lt;br&gt;&amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; final TestInterface mock = mockery.mock (TestInterface.class);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mockery.checking (new Expectations () {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; one (mock).method ();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Thread t = new Thread () {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Override
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public void run ()
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mock.method ();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mock.otherMethod ();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; t.start ();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; t.join ();
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&lt;br&gt;This test passes, despite the fact that the call to mock.otherMethod() 
&lt;br&gt;is unexpected. &amp;nbsp;The test correctly catches the case where mock.method() 
&lt;br&gt;is not called, but fails to detect inappropriate calls: a 
&lt;br&gt;java.lang.AssertionError is thrown, but nothing is in place to catch 
&lt;br&gt;it. &amp;nbsp;Ideally, I think this assertion error should be stored, and then 
&lt;br&gt;rethrown by mockery.assertIsSatisfied().
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/jMock---User-f2665.html&quot; embed=&quot;fixTarget[2665]&quot; target=&quot;_top&quot; &gt;jMock - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Thoughts-on-jMock-and-multithreading--tp22264297p25829134.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25828483</id>
	<title>Re: Thoughts on jMock and multithreading?</title>
	<published>2009-10-09T14:55:26Z</published>
	<updated>2009-10-09T14:55:26Z</updated>
	<author>
		<name>Nat Pryce</name>
	</author>
	<content type="html">The API in the current release candidate is close to finalised. I
&lt;br&gt;can't forsee any major changes.
&lt;br&gt;&lt;br&gt;I guess the important question is where do *you* (jmock users) find
&lt;br&gt;inadequate or cumbersome. Speak now or forever hold your peace!
&lt;br&gt;&lt;br&gt;--Nat
&lt;br&gt;&lt;br&gt;On Friday, October 9, 2009, Stephen Smith &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25828483&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;steve@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Nat/Steve
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks for sharing your thoughts on the direction of JMock. On multi-threading support, do you have a specific example in mind where the current API is deemed inadequate and/or cumbersome?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Steve
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Nat Pryce wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 2009/3/1 Steve Freeman &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25828483&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;steve@...&lt;/a&gt;&amp;gt;:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I'm a bit undecided on this one. So far, we've had a very opinionated story,
&lt;br&gt;&amp;gt; which is that JMock doesn't do multithreading. If you want to test threaded
&lt;br&gt;&amp;gt; code, then there are other ways to do that, especially now that Hamcrest is
&lt;br&gt;&amp;gt; shaping up.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; One of our strong claims is that jmock will help you write the &amp;quot;right&amp;quot; kind
&lt;br&gt;&amp;gt; of code because it pushes you into the appropriate corners, for example that
&lt;br&gt;&amp;gt; threaded code should minimise its synchronisation points. I fear that we'll
&lt;br&gt;&amp;gt; lose the message if we make it too easy -- that's why mocking classes is an
&lt;br&gt;&amp;gt; extension and not built-in.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; An alternative to implementing support for threads is to complain when
&lt;br&gt;&amp;gt; they're found, which would solve the confusing failures problem.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The default will be to complain if used from multiple threads, to
&lt;br&gt;&amp;gt; nudge design towards a clear separation of logic from concurrency
&lt;br&gt;&amp;gt; policy.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; However, you still need to test multithreaded code:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 1) Even when you separate logic and concurrency policy, you need to
&lt;br&gt;&amp;gt; stress-test synchronisation.  JMock can help here by isolating
&lt;br&gt;&amp;gt; synchronisation points to pinpoint failures.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 2) When you implement an abstraction in terms of third-party code that
&lt;br&gt;&amp;gt; calls into your object from multiple threads you may need to use mocks
&lt;br&gt;&amp;gt; to test outgoing calls from your object.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --Nat
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe from this list, please visit:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;   &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ------------------------------------------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; No virus found in this incoming message.
&lt;br&gt;&amp;gt; Checked by AVG - www.avg.com Version: 8.0.237 / Virus Database: 270.11.10/1996 - Release Date: 03/11/09 20:42:00
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; Stephen Smith
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.stephen-smith.co.uk/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.stephen-smith.co.uk/&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe from this list, please visit:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;  &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.natpryce.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.natpryce.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/jMock---User-f2665.html&quot; embed=&quot;fixTarget[2665]&quot; target=&quot;_top&quot; &gt;jMock - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Thoughts-on-jMock-and-multithreading--tp22264297p25828483.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25827727</id>
	<title>Re: Thoughts on jMock and multithreading?</title>
	<published>2009-10-09T13:50:30Z</published>
	<updated>2009-10-09T13:50:30Z</updated>
	<author>
		<name>Stephen Smith-2</name>
	</author>
	<content type="html">Nat/Steve
&lt;br&gt;&lt;br&gt;Thanks for sharing your thoughts on the direction of JMock. On multi-threading 
&lt;br&gt;support, do you have a specific example in mind where the current API is deemed 
&lt;br&gt;inadequate and/or cumbersome?
&lt;br&gt;&lt;br&gt;Steve
&lt;br&gt;&lt;br&gt;Nat Pryce wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 2009/3/1 Steve Freeman &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25827727&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;steve@...&lt;/a&gt;&amp;gt;:
&lt;br&gt;&amp;gt;&amp;gt; I'm a bit undecided on this one. So far, we've had a very opinionated story,
&lt;br&gt;&amp;gt;&amp;gt; which is that JMock doesn't do multithreading. If you want to test threaded
&lt;br&gt;&amp;gt;&amp;gt; code, then there are other ways to do that, especially now that Hamcrest is
&lt;br&gt;&amp;gt;&amp;gt; shaping up.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; One of our strong claims is that jmock will help you write the &amp;quot;right&amp;quot; kind
&lt;br&gt;&amp;gt;&amp;gt; of code because it pushes you into the appropriate corners, for example that
&lt;br&gt;&amp;gt;&amp;gt; threaded code should minimise its synchronisation points. I fear that we'll
&lt;br&gt;&amp;gt;&amp;gt; lose the message if we make it too easy -- that's why mocking classes is an
&lt;br&gt;&amp;gt;&amp;gt; extension and not built-in.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; An alternative to implementing support for threads is to complain when
&lt;br&gt;&amp;gt;&amp;gt; they're found, which would solve the confusing failures problem.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; The default will be to complain if used from multiple threads, to
&lt;br&gt;&amp;gt; nudge design towards a clear separation of logic from concurrency
&lt;br&gt;&amp;gt; policy.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; However, you still need to test multithreaded code:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 1) Even when you separate logic and concurrency policy, you need to
&lt;br&gt;&amp;gt; stress-test synchronisation. &amp;nbsp;JMock can help here by isolating
&lt;br&gt;&amp;gt; synchronisation points to pinpoint failures.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 2) When you implement an abstraction in terms of third-party code that
&lt;br&gt;&amp;gt; calls into your object from multiple threads you may need to use mocks
&lt;br&gt;&amp;gt; to test outgoing calls from your object.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; --Nat
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe from this list, please visit:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ------------------------------------------------------------------------
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; No virus found in this incoming message.
&lt;br&gt;&amp;gt; Checked by AVG - www.avg.com 
&lt;br&gt;&amp;gt; Version: 8.0.237 / Virus Database: 270.11.10/1996 - Release Date: 03/11/09 20:42:00
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;Stephen Smith
&lt;br&gt;&lt;a href=&quot;http://www.stephen-smith.co.uk/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.stephen-smith.co.uk/&lt;/a&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/jMock---User-f2665.html&quot; embed=&quot;fixTarget[2665]&quot; target=&quot;_top&quot; &gt;jMock - User&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Thoughts-on-jMock-and-multithreading--tp22264297p25827727.html" />
</entry>

</feed>
