Skip to main content

Java

Common directory for JDKs installed with DNF

/usr/lib/jvm

Mockito

tip

When using @InjectMocks objects mocked with @Mock need to have EXACTLY the same type in both the original and tests classes (not a subclass/superclass).

Spring

Common static imports used in tests

import static org.assertj.core.api.Assertions.*;
import static org.hamcrest.Matchers.*;
import static org.mockito.BDDMockito.*;
import static org.mockito.Mockito.*;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;