<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Dave Page &#187; java</title>
	<atom:link href="http://chwalisz.org/tag/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://chwalisz.org</link>
	<description>Stuff</description>
	<lastBuildDate>Sun, 06 May 2012 23:35:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Mockito and void methods on mock objects</title>
		<link>http://chwalisz.org/2010/01/05/mockito-and-void-methods-on-mock-objects/</link>
		<comments>http://chwalisz.org/2010/01/05/mockito-and-void-methods-on-mock-objects/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 21:45:10 +0000</pubDate>
		<dc:creator>dave</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[mockito]]></category>
		<category><![CDATA[test]]></category>

		<guid isPermaLink="false">http://chwalisz.org/?p=462</guid>
		<description><![CDATA[<p>SO I have class TestFoo {</p> <p>} TestFoo s1 = Mockito.mock(TestFoo.class); TestFoo s2 = Mockito.mock(TestFoo.class);</p> <p>The Mockito doc &#8220;Real Partial Mocks&#8221; says to do this:</p> <p> when(mock.someMethod()).thenCallRealMethod();</p> <p>we get the error </p> <p>&#8220;The method when(T) in the type Mockito is not applicable for the arguments (void)&#8221;</p> <p>After 1/2 hour of hunting I found a hint, [...]]]></description>
			<content:encoded><![CDATA[<div class='wb_fb_top'><div style="float:right;"></div></div><p>SO I have<br />
 class TestFoo {</p>
<p>}<br />
   TestFoo s1 = Mockito.mock(TestFoo.class);<br />
   TestFoo s2 = Mockito.mock(TestFoo.class);</p>
<p>The Mockito doc <a href="http://mockito.googlecode.com/svn/tags/latest/javadoc/org/mockito/Mockito.html#16">&#8220;Real Partial Mocks&#8221;</a> says to do this:</p>
<blockquote><p>
<code>when(mock.someMethod()).thenCallRealMethod();</code></p></blockquote>
<p>we get the error </p>
<blockquote><p>&#8220;The method when(T) in the type Mockito is not applicable for the arguments (void)&#8221;</p></blockquote>
<p>After 1/2 hour of hunting I found a hint, and refactored:</p>
<blockquote><p>
<code>Mockito.doCallRealMethod().when(s1).assertEquals(s2);</code></p>
</blockquote>
<div class='wb_fb_comment'><br/></div>]]></content:encoded>
			<wfw:commentRss>http://chwalisz.org/2010/01/05/mockito-and-void-methods-on-mock-objects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mavica 411</title>
		<link>http://chwalisz.org/2009/05/16/mavica-411/</link>
		<comments>http://chwalisz.org/2009/05/16/mavica-411/#comments</comments>
		<pubDate>Sun, 17 May 2009 00:05:55 +0000</pubDate>
		<dc:creator>dave</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[cameras]]></category>
		<category><![CDATA[digital camera]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[photography]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[tech support]]></category>

		<guid isPermaLink="false">http://chwalisz.org/?p=287</guid>
		<description><![CDATA[<p>At Bette&#8217;s school, the classroom digicam is a Sony Mavica MVC-FD200, circa 2002, very old school with a FLOPPY drive or Memory Stick media. &#8230;Memory Stick card slot and can store up to 128MB of images </p> <p> (from Steve&#8217;s Digicams) We found a compatible Memory Stick on eBay, but this time she did not [...]]]></description>
			<content:encoded><![CDATA[<div class='wb_fb_top'><div style="float:right;"></div></div><p>At Bette&#8217;s school, the classroom digicam is a Sony Mavica MVC-FD200, circa 2002, very old school with a FLOPPY drive or Memory Stick media.<br />
<blockquote>&#8230;Memory Stick card slot and can store up to 128MB of images </p></blockquote>
<p> (<a href="http://www.steves-digicams.com/2002_reviews/fd200.html">from Steve&#8217;s Digicams</a>) We found a compatible Memory Stick on eBay, but this time she did not have it, so used the floppy disk drive. I shoved the disk it, and all I found was a series of .411 files.</p>
<p>Huh? Would not open in Paint Shop Pro, ThumbsPlus or renaming to .jpg did not help. After a bit o&#8217;Googling I found they are thumbnail files for the camera, made to go along with an HTM file which the camera produces. The only way I could find to show the images are with an old-school Java 1.1 app, <a href="http://www.geocities.com/SiliconValley/Hills/3140/javicadownload.html">Javica</a>.</p>
<p>So I downloaded the <a href="http://java.sun.com/products/archive/jdk/1.1.8_010/jre/index.html">Java 1.1 JRE from Sun</a> and installed it. Tried to run the javica.jar file, would not start. Reset JAVA_HOME and the PATH environments.</p>
<p>Test it:<br />
<code> C:\devtools\Java\jre1.1\bin>jre -cp .\Javica.jar<br />
Java(tm) Runtime Loader Version 1.1.8_010</code></p>
<p>Opened the JAR with WinZip, read the Manifest. Nothing. Looked thru the class files. Found <code>com.javica.Javica.class</code>. Very sensible.</p>
<p>Take 2:<br />
<code>C:\devtools\Java\jre1.1\bin>jre -cp .\Javica.jar com.javica.Javica</code><br />
Bam! The GUI comes up and shows horrible lo-resolution thumbnails. Basically unusable. But I could tell they were pictures of our house. Huh?</p>
<p>Then I noticed the files were from 2006. I found that I used the wrong disk. All jpgs were on the ORANGE floppy! These were thumbnails from older 2006 pictures, of which I had the jpgs.</p>
<p>At least I can say I ran a 1.1 JRE. Now I need to repair the registry:<br />
<code>Registry key 'Software\JavaSoft\Java Runtime Environment\CurrentVersion'<br />
has value '1.1', but '1.6' is required.<br />
Error: could not find java.dll<br />
Error: could not find Java SE Runtime Environment.</code></p>
<p>These cameras are $988 on Amazon why?</p>
<div class='wb_fb_comment'><br/></div>]]></content:encoded>
			<wfw:commentRss>http://chwalisz.org/2009/05/16/mavica-411/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

