<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Mockito: Verifying Details of an Object Passed to a Collaborator</title>
	<atom:link href="http://blog.james-carr.org/2009/09/28/mockito-verifying-details-of-an-object-passed-to-a-collaborator/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.james-carr.org/2009/09/28/mockito-verifying-details-of-an-object-passed-to-a-collaborator/</link>
	<description>Rants and Musings of an Agile Developer</description>
	<lastBuildDate>Thu, 26 Jan 2012 11:54:46 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
	<item>
		<title>By: Srinivasa Reddy</title>
		<link>http://blog.james-carr.org/2009/09/28/mockito-verifying-details-of-an-object-passed-to-a-collaborator/#comment-255999</link>
		<dc:creator>Srinivasa Reddy</dc:creator>
		<pubDate>Fri, 25 Nov 2011 06:02:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.james-carr.org/?p=514#comment-255999</guid>
		<description>Thanks James.. I was exactly searching for it.</description>
		<content:encoded><![CDATA[<p>Thanks James.. I was exactly searching for it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Carr</title>
		<link>http://blog.james-carr.org/2009/09/28/mockito-verifying-details-of-an-object-passed-to-a-collaborator/#comment-114275</link>
		<dc:creator>James Carr</dc:creator>
		<pubDate>Tue, 29 Sep 2009 21:07:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.james-carr.org/?p=514#comment-114275</guid>
		<description>Thanks Peter... I was unaware of Spock and now I&#039;ll have to check it out. ;)</description>
		<content:encoded><![CDATA[<p>Thanks Peter&#8230; I was unaware of Spock and now I&#8217;ll have to check it out. <img src='http://blog.james-carr.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Niederwieser</title>
		<link>http://blog.james-carr.org/2009/09/28/mockito-verifying-details-of-an-object-passed-to-a-collaborator/#comment-114269</link>
		<dc:creator>Peter Niederwieser</dc:creator>
		<pubDate>Tue, 29 Sep 2009 18:40:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.james-carr.org/?p=514#comment-114269</guid>
		<description>For Java, that&#039;s probably the best that can be achieved. Groovy + Spock are even more succinct:

class AdministrativeUserServiceSpec extends Specification {
	def publisher = Mock(EventPublisher)
	def administrators = new AdministrativeUserService(publisher)
	
	def &quot;should fire an event of type user_added when new user is added&quot;() {
		def user = new User()
		
		when:
		administrators.add(user)
		
		then:
		1 * publisher.publish({ it.type == EventType.USER_ADDED })
	}
}</description>
		<content:encoded><![CDATA[<p>For Java, that&#8217;s probably the best that can be achieved. Groovy + Spock are even more succinct:</p>
<p>class AdministrativeUserServiceSpec extends Specification {<br />
	def publisher = Mock(EventPublisher)<br />
	def administrators = new AdministrativeUserService(publisher)</p>
<p>	def &#8220;should fire an event of type user_added when new user is added&#8221;() {<br />
		def user = new User()</p>
<p>		when:<br />
		administrators.add(user)</p>
<p>		then:<br />
		1 * publisher.publish({ it.type == EventType.USER_ADDED })<br />
	}<br />
}</p>
]]></content:encoded>
	</item>
</channel>
</rss>

