<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Stub on Micha Kops&#39; Tech Notes</title>
    <link>https://www.hascode.com/tags/stub/</link>
    <description>Recent content in Stub on Micha Kops&#39; Tech Notes</description>
    <generator>Hugo -- 0.147.8</generator>
    <language>en</language>
    <copyright>Copyright © 2010 - 2025 Micha Kops. #213243b1d6e8932079e09227d3f3ed0c806cd0c9</copyright>
    <lastBuildDate>Tue, 05 Jan 2016 00:00:00 +0100</lastBuildDate>
    <atom:link href="https://www.hascode.com/tags/stub/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Mocking HTTP Interaction with Java, JUnit and MockServer</title>
      <link>https://www.hascode.com/mocking-http-interaction-with-java-junit-and-mockserver/</link>
      <pubDate>Tue, 05 Jan 2016 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/mocking-http-interaction-with-java-junit-and-mockserver/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When writing tests for our software components sometimes we need to mock external services based on the HTTP protocol, might it be a RESTful web-service, an XML-RPC call or a simple GET request to some web-server.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short tutorial I’d like to demonstrate how to create a mock HTTP server for testing and how to bootstrap and bind it to the life-cycle of a classical build-management tool like Maven.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Mocking, Stubbing and Test Spying using the Mockito Framework and PowerMock</title>
      <link>https://www.hascode.com/mocking-stubbing-and-test-spying-using-the-mockito-framework-and-powermock/</link>
      <pubDate>Sun, 27 Mar 2011 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/mocking-stubbing-and-test-spying-using-the-mockito-framework-and-powermock/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;mockito-tutorial.png&#34; alt=&#34;mockito tutorial&#34;/&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Today we’re going to take a look at the Mockito framework that not only does sound like my favourite summer cocktail but also offers nice testing, mocking/stubbing, test-spying features and mock injections.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;After that we’re going to take a look on how to mock static or final classes by extending Mockito’s capabilities with PowerMock.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We don’t need much for the following samples .. Java of course, Maven dependency management and that’s all ..&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
  </channel>
</rss>
