Learn how to capture method arguments using Spock’s Stubs, Mocks, and Spies using Closures.
Also find me here:
Baeldung Author
Roger Yates
I’m a certified Java Enterprise Architect with over 20 years of Java server-side development experience, mainly in the financial and travel industries. Most recently using Spring Boot for REST API development and am an avid fan of the Spock testing framework.
Here's what I've written (so far):
Baeldung on Java
- All
- Testing (2)
- Spring Boot (2)
- Java (2)
- Spring Security (1)
- Maven (1)
- Java IO (1)
- JVM (1)
- HTTP Client-Side (1)
- Groovy (1)
Improving Test Coverage and Readability With Spock’s Data Pipes and Tables
Filed under Testing
Learn how to use Spock’s data feeds in a where block.
Java HttpClient Connection Management
Filed under HTTP Client-Side
Learn how the Java HttpClient reuses connections from its internal connection pool.
Using @NotNull on a Method Parameter
Filed under Spring Boot
A guide to using @NotNull on method parameters.
Spring @EnableWebSecurity vs. @EnableGlobalMethodSecurity
Filed under Spring Boot, Spring Security
Spring Security in Spring Boot allows a couple of different approaches for setting access rights for our endpoints. We explore both the standard web security module and the JSR–250 approach here.
The java.security.egd JVM Option
Filed under JVM
The java.security.egd JVM startup property affects how the SecureRandom class initializes. Let’s explore how changing its value impacts our code.
Jess Rule Engine and JSR 94
Filed under Java
Learn how to integrate the Jess rule engine into a Java application and how to use Jess with JSR 94, the Java Rule Engine API.
Java IO vs NIO
Filed under Java IO
Learn about the Java IO and NIO libraries and how they differ.
Using Maven Behind a Proxy
Filed under Maven
Learn how to configure Maven to work from behind a proxy.
Using Lombok’s @Accessors Annotation
Filed under Java
Learn about Project Lombok’s @Accessors annotation and its support for fluent, chained, and custom accessors.