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 (5)
- Spring MVC (4)
- Spring Data (2)
- Spring (2)
- REST (2)
- JVM (2)
- JPA (2)
- Testing (1)
- Spring Boot (1)
- Persistence (1)
- Java String (1)
- Java Streams (1)
- Java Collections (1)
- Jackson (1)
- JSON (1)
- Algorithms (1)
Mapping a Single Entity to Multiple Tables in JPA
Filed under JPA
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 JVM
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 JVM
Explore how Z Garbage Collector manages to keep low pause times on even multi-terabyte heaps.
Java 8 Streams peek() API
Filed under Java Streams
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 String
Explore several ways to remove leading and trailing characters from a String.
Many-To-Many Relationship in JPA
Filed under JPA, 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.
Baeldung on Computer Science
- All
- Programming (5)
- Core Concepts (1)
Code Smells
Filed under Programming
Explore ideas how to prevent a codebase’s quality from decreasing.
Refactoring
Filed under Programming
Learn that refactoring is a natural and essential part of a software’s evolution
What Does It Mean to Program to Interfaces?
Filed under Programming
A quick and practical introduction to programming to an interface.
Object-Oriented vs Functional Programming
Filed under Programming
Learn about object-oriented and functional programming and discover that they are not mutually exclusive.
The General Concept of Polymorphism
Filed under Core Concepts
Learn what polymorphism is with examples.
Object-Orientation in the Real World
Filed under Programming
Explore the core concepts behind the object-oriented programming.