Learn the advantages and disadvantages of the configuring a mock object the when().thenXxx() or the doXxx().when() way.
Also find me here:
Baeldung Author
Attila Fejér
I'm a software engineer and electrical engineer who is always open to innovative technologies and new professional challenges from programming to managing my own business. My expertise is the Java ecosystem. My hobbies include playing the guitar, riding my motorbike, dancing and creating custom gadgets.
Here's what I've written (so far):
Baeldung on Java
- All
- Java (9)
- Spring MVC (4)
- Spring (3)
- Spring Data (2)
- REST (2)
- Persistence (2)
- Testing (1)
- Spring Boot (1)
- Java Collections (1)
- Jackson (1)
- JSON (1)
- Algorithms (1)
Mapping a Single Entity to Multiple Tables in JPA
Filed under Persistence, Spring
Learn how to map a single Java entity to multiple database tables using JPA.
Command-Line Arguments in Java
Filed under Java
Explore how to configure your Java applications using command-line arguments.
Composition, Aggregation, and Association in Java
Filed under Java
Explore the properties and representation of composition, aggregation, and association in Java.
An Introduction to Epsilon GC: A No-Op Experimental Garbage Collector
Filed under Java
Learn how Epsilon works, and explore the common use cases.
An Introduction to ZGC: A Scalable and Experimental Low-Latency JVM Garbage Collector
Filed under Java
Explore how Z Garbage Collector manages to keep low pause times on even multi-terabyte heaps.
Java 8 Streams peek() API
Filed under Java
Learn about the peek() method and explore the lifecycle of a stream.
Mapping a Dynamic JSON Object with Jackson
Explore multiple ways of handling dynamic JSON objects with Jackson.
Remove Leading and Trailing Characters from a String
Filed under Java
Explore several ways to remove leading and trailing characters from a String.
Many-To-Many Relationship in JPA
Filed under Persistence
Learn how to model a many-to-many relationship in Java using JPA
Heap Sort in Java
Filed under Algorithms, Java
Learn how to implement a Binary Heap and Heap Sort in Java.
Use Criteria Queries in a Spring Data Application
Filed under Spring Data
A quick tutorial to using JPA Criteria Queries using Spring Data JPA.
Remove All Occurrences of a Specific Value from a List
Filed under Java, Java Collections
In this tutorial, we’ll see multiple solutions to efficiently removing all occurrences of a value, describing the pros and cons.
Using Spring ResponseEntity to Manipulate the HTTP Response
Filed under REST, Spring MVC
Learn how to manipulate the HTTP response using the ResponseEntity class.
Using Spring @ResponseStatus to Set HTTP Status Code
Filed under REST, Spring MVC
Have a look at the @ResponseStatus annotation and how to use it to set the response status code.
Spring Core Annotations
Filed under Spring
Explore the most commonly used Spring core annotations.
Spring Scheduling Annotations
Filed under Spring
Explore the most common Spring scheduling annotations.
Spring Web Annotations
Filed under Spring MVC
Explore the main annotations you can use to handle HTTP requests and responses in Spring MVC.
Spring Boot Annotations
Filed under Spring Boot
Explore the Spring Boot Annotations.
Spring Data Annotations
Filed under Spring Data
Learn about the most important annotations we need to handle persistence using the Spring Data project
Working with Boolean in Thymeleaf
Filed under Spring MVC
Take a look at how to work with boolean values in Thymeleaf.