How to use annotations in Mockito – @Mock, @Spy, @Captor and @InjectMocks and the MockitoJUnitRunner to enable them.
Also find me here:
Baeldung Author
Eugen Paraschiv
I’m a software engineer with a passion for REST, TDD and clean code, Web Security and Data Mining. Baeldung is about all of these and more.
Here's what I've written (so far):
Baeldung on Java
- All
- Weekly Review (152)
- Spring (38)
- Spring Security (29)
- REST (23)
- Java IO (22)
- HTTP Client-Side (20)
- Jackson (18)
- Data (17)
- Java Collections (11)
- Java (9)
- Testing (8)
- Spring MVC (7)
- Maven (7)
- Spring Persistence (6)
- Persistence (6)
- Java List (6)
- JPA (6)
- Spring Web (5)
- Java String (5)
- Spring Boot (4)
- Spring Data (3)
- Security (2)
- Meta (2)
- Java Map (2)
- Java Array (2)
- JSON (2)
- Cloud (2)
- News (1)
- Java Numbers (1)
- Java Concurrency (1)
- IDE (1)
- Core Java (1)
- Artificial Intelligence (1)
- Architecture (1)
Baeldung Weekly Review 45
Filed under Weekly Review
This week was all about the next version of Java – the language is definitely not standing still. That and a host of useful Spring replays from SpringOne.
Spring Events
Filed under Spring
The Basics of Events in Spring – create a simple, custom Event, publish it and handle it in a listener.
Serve Static Resources with Spring
Filed under Spring MVC
How to map and handle static resources with Spring MVC – use the simple configuration, then the 3.1 more flexible one and finally the new 4.1 resource resolvers.
Spring Profiles
Filed under Spring
How to define and use Profiles in Spring. The 4 ways to enable profiles and their precedence. And a real-world example using profiles.
Baeldung Weekly Review 44
Filed under Weekly Review
This was quite a week and so we have an interesting roundup. Lots of solid Java and Spring articles as well as some other useful pieces on leadership and affecting positive change.
Guava – Maps
Filed under Java Map
Working with the Guava Map support to create immutable, sorted, bi and multi maps, as well as other useful map implementations.
Build a REST API with Spring and Java Config
Building a REST Service with Spring and Java based Configuration, HTTP response codes, REST payloads and marshalling, testing.
Guava – Sets
Filed under Java Collections
Working with Sets in Guava – intersection, union, cartesian product, set of ranges and other useful code samples.