I am experimenting MockMvc of Spring framework. To call perform method of MockMvc I would need to have an import as following
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
Partial code
this.mockMvc.perform(get("/")).andExpect(view().name("homePage"));
I know get method is static, but it is the first time that I see import has static keyword. Is anyone able to explain this to me? why static keyword is required? why just method is imported? I am a bit confused with this.