### Question:
ElectronDetectorRestController extends BaseValidatingRestController<ElectronDetector, ElectronDetectorService> { @NonNull @PostMapping @ResponseStatus(HttpStatus.CREATED) public ElectronDetector createItem(@NonNull @Valid @RequestBody ElectronDetector input) { return this.service.createItem(input); } @Autowired  ElectronDetectorRestController(final ElectronDetectorService service,
                                   final ElectronDetectorValidator validator); @NonNull @PostMapping @ResponseStatus(HttpStatus.CREATED) ElectronDetector createItem(@NonNull @Valid @RequestBody ElectronDetector input);  }### Answer:
@Test public void createElectronDetector() throws Exception { final ElectronDetector electronDetector = commonCreateDetector() .label("label 3") .build(); final String json = new ObjectMapper().writeValueAsString(electronDetector); getMockMvc().perform(post(URI).contentType(JSON_CONTENT_TYPE).content(json)).andExpect(status().isCreated()); verify(service, times(1)).createItem(electronDetector); }