The Java Substrate
Records and sealed interfaces, immutability and defensive copying, and proving a design works with JUnit 5 before the patterns chapters begin.
Resource management (Java's RAII)
Deterministic cleanup without a destructor: try-with-resources and AutoCloseable as Java's primary answer, and the Execute-Around Method idiom for the cases a resource's open/use/close sequence belongs to a library rather than every call site, taught against a carrier connection, a batch ledger writer, and a pooled tracking-feed handle.
Encapsulation and API design
A shipping-tracking gateway built behind a public interface with a package-private implementation reached through a static factory, and a Shipment/Manifest/TrackingHistory value model built from records whose compact constructors defend every collection field with List.copyOf.
Testing with JUnit 5, Mockito, and AssertJ
The testing stack every example in this book runs behind the scenes: JUnit 5's lifecycle and parameterized tests, Mockito's mocks and spies, and AssertJ's fluent assertions, taught against a shipment-booking service with one collaborator mocked and two called directly.