Category "spring-test"

Injection problem in Spring Boot Test: "messageConverters must not be empty"

I have a strange problem with a Spring Boot Test. The test itself is empty, but it does not even manage to start the application. I get an error "Failed to load

spring batch+spring boot+java config+test cases

spring batch+spring boot+java config+test cases I have followed the below example and my use case matches this, I have implemented the project with similar set

Integration testing using @SpringBootTest is not picking auto-configuration of library configured using spring.factories

We have a library ,in order to auto-configure the library we use spring.factories file under(src/main/resources/META-INF) which provides classes to auto-configu

@MockBean not fluent with testNG

With JUnit i could use @MockBean easily : @SpringBootTest(classes = AppConfig.class) @RunWith(SpringRunner.class) public @Log class ServiceDrhImplT

Adding @SpringBootTest to test class hang unit tests

I want to test my Spring application. When I add the @SpringBootTest to my test class, tests hang and not starting even if I wait for more than an hour! Removin

Spring MVC 5 ResultMatcher jsonPath null value

After upgrading my rest service from Spring Boot 1.5.10 to 2.0.0 I encountered my tests failing which passed before. Following Scenario: import org.mockito.in

Mockito argument matcher and hibernate lazyinitialization

I've created the following captor: public class CompanyOwnerMatcher extends ArgumentMatcher<CompanyOwner> { private String uuid; CompanyOwnerMa

How to use MockRestServiceServer with multiple URLs?

I need to configure multiple expectations on an instance of MockRestServiceServer. The expectations are for two different URLs: Call URL #1 Call URL #1 (for a

@webMvcTest is not excluding and loading beans marked as @Repository

I've a @RestController which has only one dependency in field @Autowire that dependency is @component, that component Class definition has some autowired field

Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test

I am using Spring Data JPA and Spring Boot. The layout of the application is this main +-- java +-- com/lapots/game/monolith +-- reposi