DZone
Java Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Java Zone > Mockito – Screencasts for Stubbing, Verifying, and Argument Matching

Mockito – Screencasts for Stubbing, Verifying, and Argument Matching

Hamlet D'Arcy user avatar by
Hamlet D'Arcy
·
Dec. 15, 10 · Java Zone · Interview
Like (0)
Save
Tweet
8.81K Views

Join the DZone community and get the full member experience.

Join For Free

We're rolling out Mockito and trying to raise our testability at work and I'm set to give a presentation/training session tomorrow to a few new teams. In case you don't know, Mockito is a mock object framework for Java. It's competitors are EasyMock, JMock, and others if you're more familiar with those. If you haven't seen it then you may want to check out my old post "Mockito - Pros, Cons, and Best Practices". To prepare for my presentation I decided to record myself practicing my material and post it on youtube. Enjoy!

The first screencast is about creating mock objects and stubbing behavior. These are the absolute basics of mocking.


The second screencast is about verifying behavior, or verifying side effects, using Mockito. This is a little more advanced but still an essential API in working with Mockito. YouTube reports this video as 13 minutes long, but don't worry it is only 4:45. Some quirk of YouTube.


The final screencast is about argument matchers, which add flexibility to your stub and verify phases.


I hope you enjoyed these. They could be a little more practiced, but I'm happy enough with the quality. I recorded these on Ubuntu 10.4 using recordMyDesktop and mencode to convert from .ogv to .avi.

From http://hamletdarcy.blogspot.com/2010/12/mockito-screencasts-for-stubbing.html

Mockito

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • SQL vs. NoSQL: Pros and Cons
  • Introduction to Word Vectors
  • Data Mesh — Graduating Your Data to Next Level
  • What I Miss in Java, the Perspective of a Kotlin Developer

Comments

Java Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo