service.updatePermissionTemplate(1L, "template1", "template1", "[azerty");
}
@Test
public void should_skip_name_validation_where_not_applicable() throws Exception {
PermissionTemplateDto template1 =
new PermissionTemplateDto().setId(1L).setName("template1").setDescription("template1");
PermissionTemplateDto template2 =
new PermissionTemplateDto().setId(2L).setName("template2").setDescription("template2");
when(permissionTemplateDao.selectAllPermissionTemplates()).thenReturn(Lists.newArrayList(template1, template2));
service.updatePermissionTemplate(1L, "template1", "new_description", null);
verify(permissionTemplateDao).updatePermissionTemplate(1L, "template1", "new_description", null);