DZone
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
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • How To Validate HTTP Post Request Body - Restful Web Services With Spring Framework | Spring Boot
  • A Guide to Enhanced Debugging and Record-Keeping
  • Best Practices for Writing Unit Tests: A Comprehensive Guide
  • Spring Boot - How To Use Native SQL Queries | Restful Web Services

Trending

  • Building a High-Throughput Distributed Sequence Generator Using the Hi-Lo Algorithm
  • Slopsquatting: Building a Scanner That Catches AI-Hallucinated Packages Before They Reach Production
  • Testing AI-Infused Apps: A Dual-Layer Framework for AI Quality Assurance
  • Beyond Manual Annotation: Engineering Self-Correcting Pseudo-Labeling Pipelines
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Testing, Tools, and Frameworks
  4. Mocking With the Mockito Framework and Testing REST APIs [Video]

Mocking With the Mockito Framework and Testing REST APIs [Video]

This video tutorial covers the Mockito framework and testing REST APIs/services.

By 
Tarun Telang user avatar
Tarun Telang
·
Oct. 30, 18 · Tutorial
Likes (6)
Comment
Save
Tweet
Share
38.2K Views

Join the DZone community and get the full member experience.

Join For Free

Overview

This session covers the following topics:

  • Recap of the Unit Testing session -  Introduction to Unit Tests in Java using JUnit 5 [Video]

  • Recap of Test Driven Development (TDD) session -  JUnit5 Deep Dive Using Test Driven Development [Video]

  • Introduction to following terminologies and their differences

    • Dummy Class
    • Fake Class
    • Stub Class
    • Mock Class
  • Basics of Spring Boot

  • Testing REST services with example service for Hello World and Factorial

  • Mocking with the Mockito framework

Pre-Requisites

  • You should have Spring Tools Suite (STS) 4 or Any other open source IDE installed on your laptop with Java SDK 1.8.
  • Some understanding of dependency management and build tools like Ant, Maven or Gradle would be helpful but not essentially required.
  • familiarity with Unit Testing using JUnit (As covered in the previous session)
  • For maximum benefit from this session, you can try out the step together while watching this on your computer.

Note: No slides were presented during this session; concepts were explained using Live Coding.


REST Web Protocols unit test Framework Mockito Spring Framework Test-driven development

Opinions expressed by DZone contributors are their own.

Related

  • How To Validate HTTP Post Request Body - Restful Web Services With Spring Framework | Spring Boot
  • A Guide to Enhanced Debugging and Record-Keeping
  • Best Practices for Writing Unit Tests: A Comprehensive Guide
  • Spring Boot - How To Use Native SQL Queries | Restful Web Services

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

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

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook