Spring Boot - Testing Spring Boot Applications
Consider this test code snippet:
When running this test, it fails with a NullPointerException. What is the most likely cause?
@MockBean
private OrderService orderService;
@Test
void testOrder() {
orderService.placeOrder();
verify(orderService).placeOrder();
}When running this test, it fails with a NullPointerException. What is the most likely cause?
