Spring Boot gives you a testing pyramid: fast unit tests with no Spring, focused slice tests that load part of the context, and a few full-context integration tests. Picking the right level per test is the senior skill here.
Unit test — no Spring at all
Constructor injection means most service logic needs zero Spring; just mock collaborators:
{
mock(PriceRepository.class);
(repo.base()).thenReturn(BigDecimal.TEN);
(repo);
assertThat(svc.priceOf()).isEqualByComparingTo();
}
