### Question:
TransactionalExternalLinkService extends AbstractTransactionalEntityService<ExternalLink, ExternalLinkDao> implements ExternalLinkService { @Override @PreAuthorize("hasPermission(#forumComponent.id, 'COMPONENT', 'GeneralPermission.ADMIN')") public void saveLink(ExternalLink link, Component forumComponent) { getDao().saveOrUpdate(link); } TransactionalExternalLinkService(ExternalLinkDao dao); @Override List<ExternalLink> getLinks(); @Override @PreAuthorize("hasPermission(#forumComponent.id, 'COMPONENT', 'GeneralPermission.ADMIN')") void saveLink(ExternalLink link, Component forumComponent); @Override @PreAuthorize("hasPermission(#forumComponent.id, 'COMPONENT', 'GeneralPermission.ADMIN')") boolean deleteLink(long id, Component forumComponent);  }### Answer:
@Test public void testAddLink() throws Exception { ExternalLink linkToSave = new ExternalLink(); Component component = new Component(); service.saveLink(linkToSave, component); verify(dao).saveOrUpdate(linkToSave); }