Practical Unit Testing in Java 10

Workshops are based on simple, real-life, spring-based application as a case study, which is used to practise designing, writing and maintaining of unit tests. We focus on the most useful and popular nowadays frameworks: JUnit, Mockito and AssertJ, using Java 8 features extensively. We not only describe their capabilities in detail, but also show how to combine them together to significantly facilitate the creation of well separated and transparent test cases. Participants will acquire practical knowledge about the most common mistakes and best practices (including TDD and BDD).

Duration: 2 days
Level: intermediate

Practical Unit Testing in Java 10

Nearest term:
- ,  2019 Kraków

Group Discounts:

1+2 friends
1500.00PLN   30% off
1+1 friend
1500.00PLN   20% off
Individual measure - Kontaktiere uns


      • At least 1 year of practical experience with Java
      • Basic knowledge of Spring


      • A good understanding of unit testing, best practices and must-know testing frameworks
      • Access to exclusive materials covering the scope of the workshops


  • DAY 1

    • Introduction

      • The purpose of software tests
      • Types of tests and key differences
      • Do we really need unit tests? - case study
      • Place of tests in software deployment process
    • JUnit

      • Introduction: general rules, execution order, annotations, assertions
      • Exercise
      • Testing exceptions: @Rule and @ExpectedException
      • Exercise
      • Test suites, parameterized tests, categories
      • Exercise
    • Unit test best practises

      • Defining good unit tests
      • Examples of poor unit tests - case studies
      • Naming conventions
      • Test boundaries, avoiding interdependencies
      • TDD and BDD
      • Is my code coverage sufficient?
      • Exercise
  • DAY 2

    • Let’s read our tests like a book - AssertJ

      • Let’s play with AssertJ - replacing JUnit assertions with AssertJ
      • Exercise
      • Can we make current test cases simpler?
      • AssertJ additions for Java 8
      • More Exercises - including refactoring of existing test cases
    • Exercises:

      • Complex exercises using combination of previously introduced libraries

    • Increase code coverage of the existing codebase, if required refactor the code in order to be able to unit test it.


Trainer image

Michał Marciniec

Tech Lead

Michał Marciniec is a Tech Lead at Codete. He is a Java stereotype breaker and an eager promoter of fresh approach to Java programming. Currently focused on web backend development with Java.

Workshop Schedule

- ,  2019
- ,  2019



contact person

Olga Sroka

Workshop Advisor

mail icon

phone icon width=   +48 888 011 177

contact person

Maciej Szczepański

Workshop Advisor

mail icon

phone icon width=   +48 606 42 14 76

This value should not be blank.
This value should not be blank.
Form has been submitted.
Failed to send message - please try