2 days
Online / Zoom
English
Certificate
15 people max
Victor Rentea
β¬7500
9375
Master modern unit and integration testing techniques to confidently refactor legacy code, write meaningful tests, and navigate complex frameworks with speed and clarity.
Introduction
In this workshop, weβll tackle key challenges developers face today: how to safely introduce unit tests into legacy code and refactor with confidence, what to do when a growing collection of small unit tests starts slowing down rather than supporting development, and how to write fast, clean integration tests in microservice environments that rely heavily on framework-level abstractions.
The training is designed to empower developers to thoroughly unit-test their code, understand the design feedback that unit tests provide, and review todayβs state-of-the-art techniques for both unit and integration testing.
Requirements: Experience in unit testing and comfort with mocking frameworks.
Day 1 β Fundamentals, TDD, and Testing Techniques
Testing ROI: Why do we write tests? why early? why test bugs?
Testing Metrics: Line Coverage, Branch Coverage, Mutation Testing
Strategies: Test Pyramid vs. Honeycomb Testing
Test Anatomy: Given/When/Then structure, naming tests (scope vs. specificity), Single Assert Rule
Test-Driven Development (TDD):
Red-Green-Refactor flow
TDD rules, pros, and cons
TDD Styles: Chicago ("triangulation") vs. London ("outside-in")
Exercise: Classic TDD Coding Kata + optional Outside-in TDD
Creating test data
Expressive asserts with Assert4J (assertThat)
Parameterized Tests: uses/abuses
Gherkin Tests (.feature files), BDD
Testing Legacy Code: Characterization tests and Golden-Master technique
Approval Testing
Breaking encapsulation for tests β debate
Hierarchical test fixtures
Day 2 β Advanced Mocking, Test-Driven Insights, and Integration Testing
Mocks: 3 pros, 3 cons
Basic Features (recap): stubbing, verification, argument matchers, captors, static mocks
Agnostic Domain (vs logic mixed with infrastructure)
Split by Layers of Abstraction (vs partial mocking)
Split unrelated complexity (vs fixture creep)
Contract-Driven Testing (Mock Roles, not Objects)
Extract complexity in Pure Functions
Integration Testing with Spring
Code Review of Unit Tests from Participants (optional)
Victor Rentea
Victor is a Java Champion, Java Enterprise Architect, and Independent Trainer, delivering intense masterclasses for companies worldwide since 2014. He is passionate about software architecture, clean code, refactoring, and unit testing. He is a regular speaker at top international conferences. He's also the founder of the Bucharest Software Craftsmanship Community with 4000 members.