### Question:
TemplateServiceImpl extends RemoteServiceServlet implements TemplateService { @Override public void delete(long templateId) throws ServerException { Session session = ServiceUtil.validateSession(getThreadLocalRequest()); try { TemplateDAO dao = (TemplateDAO) Context.get().getBean(TemplateDAO.class); boolean deleted = dao.delete(templateId); if (!deleted) throw new Exception("Template has not been deleted"); } catch (Throwable t) { ServiceUtil.throwServerException(session, log, t); } }  @Override void delete(long templateId); @Override long countDocuments(long templateId); @Override GUITemplate save(GUITemplate template); @Override GUITemplate getTemplate(long templateId);  }### Answer:
@Test public void testDelete() throws ServerException { service.delete(1); Template template = templateDao.findById(1); Assert.assertNull(template); }