EmailTemplateController implements IEmailTemplateClient { @Override @GetMapping("/emailTemplates") public List<IEmailTemplate> listEmailTemplates() { return this.emailTemplateDao.listAllEmailTemplates(); }  @Override @GetMapping("/emailTemplates") List<IEmailTemplate> listEmailTemplates(); @GetMapping("/emailTemplates/{emailTemplateType}") IEmailTemplate getEmailTemplate(@PathVariable String emailTemplateType); @Override @PutMapping("/emailTemplates") boolean updateEmailTemplate(@RequestBody IEmailTemplate emailTemplate); @Override @PostMapping("/emailTemplates") IEmailTemplate createEmailTemplate(@RequestBody IEmailTemplate emailTemplate);  }
@Test public void listEmailTemplates() throws Exception { this.mockMvc.perform( get("/emailTemplates") .contentType(contentType).accept(contentType)) .andExpect(status().isOk()) .andExpect(jsonPath("$").isArray()) .andExpect(content().contentType(contentType)); Mockito.verify(emailTemplateDao, atLeast(1)).listAllEmailTemplates(); }