Search code examples
@InjectMocks inject @MockBean by Constructor and setter not working properly...


javadependency-injectionmockitojunit4springmockito

Read More
any() vs any(Class.class) Mockito...


junitmockitospring-testspringmockito

Read More
Why when mocked predicate, return null pointer?...


javaspring-data-jpamockitospring-testspringmockito

Read More
NullPointerException when invoking method with Mockito in Service test...


javaunit-testingmockingmockitospringmockito

Read More
Using InjectMock and MockBean on static vs non static objects...


javamockitojunit5springmockito

Read More
Using @MockBean in tests forces reloading of Application Context...


javaspringmockitospring-testspringmockito

Read More
spring boot not able to inject spring service in spring test class...


javaspringspring-bootspring-boot-testspringmockito

Read More
When to use and not use @Mock annotation, @MockBean annotation, @InjectMock annotation & @Autowi...


javaspringspring-webfluxproject-reactorspringmockito

Read More
Getting null pointer exception while using Mockito to mock an interface...


junitmockitospringmockito

Read More
Mock object is null in JUnit Test...


javaspringjunitjunit5springmockito

Read More
Spring boot - Can't mock MongoTemplate...


springmongodbspring-bootmockitospringmockito

Read More
Why ZonedDateTime.now() throws NoSuchMethodException while running test cases(using mockito)...


javamockitodozerzoneddatetimespringmockito

Read More
spring mockito: when an object containing a list is an argument...


javaspringmockitospring-testspringmockito

Read More
Mockito when() method not working and getting null pointer exception...


javaspringjunitmockitospringmockito

Read More
How to write JUnit 5 test cases for the following code?...


javaspringunit-testingjunit5springmockito

Read More
I can't autowire Service class in Spring Boot Test...


spring-bootmockitoautowiredspring-boot-testspringmockito

Read More
Have legit Spring beans injected into a mock bean...


springmockitospringmockito

Read More
Should I write unit test for void methods (includes repository call)?...


javaspring-bootjunitmockitospringmockito

Read More
java bootstrap mock with ConditionalOnProperty and Autowired member...


spring-bootunit-testingmockitoautowiredspringmockito

Read More
Cannot execute any Mockito test. With JDK17 gives "NoSuchMethodException: sun.misc.Unsafe.defin...


mockitospringmockito

Read More
How to Mock service consisting both Autowired and RequiredArgsConstructor in JUnit 5?...


javaspringmockitojunit5springmockito

Read More
How to mock a method of Aspect class?...


spring-bootmockitojunit5spring-aopspringmockito

Read More
Impossible to write integration test controller with DAO mock?...


javaspring-bootspring-testspring-restcontrollerspringmockito

Read More
Trying to verify a method call from abstract class on a mocked service but I get a npe...


javajunitmockitojunit5springmockito

Read More
How to fix unit test Missing Method Invocation Exception?...


javaspring-bootunit-testingjunit4springmockito

Read More
How to use any() in jupiter Spring Boot?...


spring-bootjunit5spring-testspringmockito

Read More
SpringBoot testing with spring-retry...


spring-bootspring-retryspringmockito

Read More
How to mock JdbcTemplate.queryForObject() method...


javamockitojmockjmockitspringmockito

Read More
Kotlin + SpringBootTest + Junit 5 + AutoConfigureMockMvc: test passing when it was supposed to fail ...


spring-bootkotlinjunit5spring-test-mvcspringmockito

Read More
How to mock class with @ConfigurationProperties in Spring Boot...


javaspring-bootmockingmockitospringmockito

Read More
BackNext