2 * This document is a part of the source code and related artifacts
3 * for CollectionSpace, an open source collections management system
4 * for museums and related institutions:
6 * http://www.collectionspace.org
7 * http://wiki.collectionspace.org
9 * Copyright © 2009 Regents of the University of California
11 * Licensed under the Educational Community License (ECL), Version 2.0.
12 * You may not use this file except in compliance with this License.
14 * You may obtain a copy of the ECL 2.0 License at
15 * https://source.collectionspace.org/collection-space/LICENSE.txt
17 * Unless required by applicable law or agreed to in writing, software
18 * distributed under the License is distributed on an "AS IS" BASIS,
19 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 * See the License for the specific language governing permissions and
21 * limitations under the License.
23 package org.collectionspace.services.authorization.client.test;
25 //import java.util.ArrayList;
26 import java.util.List;
27 import javax.ws.rs.core.Response;
28 //import org.collectionspace.services.authorization.ActionType;
29 import org.collectionspace.services.authorization.EffectType;
31 import org.collectionspace.services.client.CollectionSpaceClient;
32 import org.collectionspace.services.client.PermissionClient;
33 import org.collectionspace.services.authorization.Permission;
34 import org.collectionspace.services.authorization.PermissionAction;
35 import org.collectionspace.services.authorization.PermissionsList;
36 import org.collectionspace.services.client.PermissionFactory;
37 import org.collectionspace.services.client.test.AbstractServiceTestImpl;
38 import org.collectionspace.services.client.test.ServiceRequestType;
39 import org.collectionspace.services.jaxb.AbstractCommonList;
40 import org.jboss.resteasy.client.ClientResponse;
42 import org.testng.Assert;
43 import org.testng.annotations.Test;
45 import org.slf4j.Logger;
46 import org.slf4j.LoggerFactory;
49 * PermissionServiceTest, carries out tests against a
50 * deployed and running Permission Service.
52 * $LastChangedRevision: 917 $
53 * $LastChangedDate: 2009-11-06 12:20:28 -0800 (Fri, 06 Nov 2009) $
55 public class PermissionServiceTest extends AbstractServiceTestImpl {
57 /** The Constant logger. */
58 static private final Logger logger =
59 LoggerFactory.getLogger(PermissionServiceTest.class);
60 // Instance variables specific to this test.
61 /** The known resource id. */
62 private String knownResourceId = null;
63 private String knownResource = "accounts-test";
64 /** The add tenant. */
65 boolean addTenant = true;
67 * This method is called only by the parent class, AbstractServiceTestImpl
71 * @see org.collectionspace.services.client.test.BaseServiceTest#getServicePathComponent()
74 protected String getServicePathComponent() {
75 return new PermissionClient().getServicePathComponent();
79 * @see org.collectionspace.services.client.test.BaseServiceTest#getClientInstance()
82 protected CollectionSpaceClient getClientInstance() {
83 return new PermissionClient();
87 * @see org.collectionspace.services.client.test.BaseServiceTest#getAbstractCommonList(org.jboss.resteasy.client.ClientResponse)
90 protected AbstractCommonList getAbstractCommonList(
91 ClientResponse<AbstractCommonList> response) {
92 //FIXME: http://issues.collectionspace.org/browse/CSPACE-1697
93 throw new UnsupportedOperationException();
97 * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#readPaginatedList(java.lang.String)
99 @Test(dataProvider = "testName")
101 public void readPaginatedList(String testName) throws Exception {
102 //FIXME: http://issues.collectionspace.org/browse/CSPACE-1697
105 // ---------------------------------------------------------------
106 // CRUD tests : CREATE tests
107 // ---------------------------------------------------------------
110 * @see org.collectionspace.services.client.test.ServiceTest#create(java.lang.String)
113 @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class)
114 public void create(String testName) throws Exception {
116 // Perform setup, such as initializing the type of service request
117 // (e.g. CREATE, DELETE), its valid and expected status codes, and
118 // its associated HTTP method name (e.g. POST, DELETE).
119 setupCreate(testName);
121 // Submit the request to the service and store the response.
122 List<PermissionAction> actions = PermissionFactory.createDefaultActions();
123 Permission permission = createPermissionInstance(knownResource,
124 "default permissions for account",
130 PermissionClient client = new PermissionClient();
131 ClientResponse<Response> res = client.create(permission);
132 int statusCode = res.getStatus();
134 // Check the status code of the response: does it match
135 // the expected response(s)?
138 // Does it fall within the set of valid status codes?
139 // Does it exactly match the expected status code?
140 if (logger.isDebugEnabled()) {
141 logger.debug(testName + ": status = " + statusCode);
143 Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
144 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
145 Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
147 // Store the ID returned from this create operation
148 // for additional tests below.
149 knownResourceId = extractId(res);
150 if (logger.isDebugEnabled()) {
151 logger.debug(testName + ": knownResourceId=" + knownResourceId);
156 * Creates the without resource name.
158 * @param testName the test name
159 * @throws Exception the exception
161 @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
162 dependsOnMethods = {"create"})
163 public void createWithoutResourceName(String testName) throws Exception {
165 setupCreate(testName);
167 // Submit the request to the service and store the response.
168 List<PermissionAction> actions = PermissionFactory.createDefaultActions();
169 Permission permission = createPermissionInstance(null,
170 "default permissions for account",
176 PermissionClient client = new PermissionClient();
177 ClientResponse<Response> res = client.create(permission);
178 int statusCode = res.getStatus();
179 // Does it exactly match the expected status code?
180 if (logger.isDebugEnabled()) {
181 logger.debug(testName + ": status = " + statusCode);
183 Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
184 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
185 Assert.assertEquals(statusCode, Response.Status.BAD_REQUEST.getStatusCode());
188 //to not cause uniqueness violation for permission, createList is removed
190 * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#createList(java.lang.String)
193 @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
194 dependsOnMethods = {"create"})
195 public void createList(String testName) throws Exception {
197 setupCreate(testName);
198 // Submit the request to the service and store the response.
199 List<PermissionAction> actions = PermissionFactory.createDefaultActions();
200 Permission permission1 = createPermissionInstance("test-objects",
201 "default permissions for test-objects",
207 PermissionClient client = new PermissionClient();
208 ClientResponse<Response> res = client.create(permission1);
209 int statusCode = res.getStatus();
210 Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
211 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
212 Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
213 allResourceIdsCreated.add(extractId(res));
215 Permission permission2 = createPermissionInstance("test-acquisitions",
216 "default permissions for test-acquisitions",
222 res = client.create(permission2);
223 statusCode = res.getStatus();
224 Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
225 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
226 Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
227 allResourceIdsCreated.add(extractId(res));
229 Permission permission3 = createPermissionInstance("test-ids",
230 "default permissions for id service",
236 res = client.create(permission3);
237 statusCode = res.getStatus();
238 Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
239 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
240 Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
241 allResourceIdsCreated.add(extractId(res));
245 // Placeholders until the three tests below can be uncommented.
246 // See Issue CSPACE-401.
248 * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#createWithEmptyEntityBody(java.lang.String)
251 public void createWithEmptyEntityBody(String testName) throws Exception {
252 //FIXME: Should this test really be empty? If so, please comment accordingly.
256 * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#createWithMalformedXml(java.lang.String)
259 public void createWithMalformedXml(String testName) throws Exception {
260 //FIXME: Should this test really be empty? If so, please comment accordingly.
264 * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#createWithWrongXmlSchema(java.lang.String)
267 public void createWithWrongXmlSchema(String testName) throws Exception {
268 //FIXME: Should this test really be empty? If so, please comment accordingly.
271 // ---------------------------------------------------------------
272 // CRUD tests : READ tests
273 // ---------------------------------------------------------------
276 * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#read(java.lang.String)
279 @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
280 dependsOnMethods = {"create"})
281 public void read(String testName) throws Exception {
286 // Submit the request to the service and store the response.
287 PermissionClient client = new PermissionClient();
288 ClientResponse<Permission> res = client.read(knownResourceId);
289 int statusCode = res.getStatus();
291 // Check the status code of the response: does it match
292 // the expected response(s)?
293 if (logger.isDebugEnabled()) {
294 logger.debug(testName + ": status = " + statusCode);
296 Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
297 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
298 Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
300 Permission output = (Permission) res.getEntity();
301 Assert.assertNotNull(output);
306 * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#readNonExistent(java.lang.String)
309 @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
310 dependsOnMethods = {"read"})
311 public void readNonExistent(String testName) throws Exception {
314 setupReadNonExistent(testName);
316 // Submit the request to the service and store the response.
317 PermissionClient client = new PermissionClient();
318 ClientResponse<Permission> res = client.read(NON_EXISTENT_ID);
319 int statusCode = res.getStatus();
321 // Check the status code of the response: does it match
322 // the expected response(s)?
323 if (logger.isDebugEnabled()) {
324 logger.debug(testName + ": status = " + statusCode);
326 Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
327 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
328 Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
331 // ---------------------------------------------------------------
332 // CRUD tests : READ_LIST tests
333 // ---------------------------------------------------------------
336 * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#readList(java.lang.String)
339 @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
340 dependsOnMethods = {"createList", "read"})
341 public void readList(String testName) throws Exception {
344 setupReadList(testName);
346 // Submit the request to the service and store the response.
347 PermissionClient client = new PermissionClient();
348 ClientResponse<PermissionsList> res = client.readList();
349 PermissionsList list = res.getEntity();
350 int statusCode = res.getStatus();
352 // Check the status code of the response: does it match
353 // the expected response(s)?
354 if (logger.isDebugEnabled()) {
355 logger.debug(testName + ": status = " + statusCode);
357 Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
358 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
359 Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
361 // Optionally output additional data about list members for debugging.
362 boolean iterateThroughList = true;
363 if (iterateThroughList && logger.isDebugEnabled()) {
364 printList(testName, list);
369 * Search resource name.
371 * @param testName the test name
372 * @throws Exception the exception
374 @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
375 dependsOnMethods = {"createList", "read"})
376 public void searchResourceName(String testName) throws Exception {
379 setupReadList(testName);
381 // Submit the request to the service and store the response.
382 PermissionClient client = new PermissionClient();
383 ClientResponse<PermissionsList> res = client.readSearchList("acquisition");
384 PermissionsList list = res.getEntity();
385 int statusCode = res.getStatus();
386 // Check the status code of the response: does it match
387 // the expected response(s)?
388 if (logger.isDebugEnabled()) {
389 logger.debug(testName + ": status = " + statusCode);
391 Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
392 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
393 Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
394 int EXPECTED_ITEMS = 1;
395 if (logger.isDebugEnabled()) {
396 logger.debug(testName + ": received = " + list.getPermissions().size()
397 + " expected=" + EXPECTED_ITEMS);
399 Assert.assertEquals(EXPECTED_ITEMS, list.getPermissions().size());
400 // Optionally output additional data about list members for debugging.
401 boolean iterateThroughList = true;
402 if (iterateThroughList && logger.isDebugEnabled()) {
403 printList(testName, list);
409 // ---------------------------------------------------------------
410 // CRUD tests : UPDATE tests
411 // ---------------------------------------------------------------
414 * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#update(java.lang.String)
417 @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
418 dependsOnMethods = {"read", "readList", "readNonExistent"})
419 public void update(String testName) throws Exception {
422 setupUpdate(testName);
424 Permission permToUpdate = new Permission();
425 permToUpdate.setCsid(knownResourceId);
426 permToUpdate.setResourceName(knownResource);
427 // Update the content of this resource.
428 permToUpdate.setDescription("updated description");
429 if (logger.isDebugEnabled()) {
430 logger.debug("updated object");
431 logger.debug(objectAsXmlString(permToUpdate,
434 PermissionClient client = new PermissionClient();
435 // Submit the request to the service and store the response.
436 ClientResponse<Permission> res = client.update(knownResourceId, permToUpdate);
437 int statusCode = res.getStatus();
438 // Check the status code of the response: does it match the expected response(s)?
439 if (logger.isDebugEnabled()) {
440 logger.debug(testName + ": status = " + statusCode);
442 Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
443 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
444 Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
447 Permission permUpdated = (Permission) res.getEntity();
448 Assert.assertNotNull(permUpdated);
450 Assert.assertEquals(permUpdated.getDescription(),
451 permToUpdate.getDescription(),
452 "Data in updated object did not match submitted data.");
455 @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
456 dependsOnMethods = {"read", "readList", "readNonExistent"})
457 public void updateNotAllowed(String testName) throws Exception {
460 setupUpdate(testName);
462 Permission permToUpdate = new Permission();
463 permToUpdate.setCsid(knownResourceId);
464 // Update the content of this resource.
465 permToUpdate.setResourceName("updated-resource");
466 if (logger.isDebugEnabled()) {
467 logger.debug("updated object");
468 logger.debug(objectAsXmlString(permToUpdate,
471 PermissionClient client = new PermissionClient();
472 // Submit the request to the service and store the response.
473 ClientResponse<Permission> res = client.update(knownResourceId, permToUpdate);
474 int statusCode = res.getStatus();
475 // Check the status code of the response: does it match the expected response(s)?
476 if (logger.isDebugEnabled()) {
477 logger.debug(testName + ": status = " + statusCode);
479 Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
480 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
481 Assert.assertEquals(statusCode, Response.Status.BAD_REQUEST.getStatusCode());
488 * @param testName the test name
489 * @throws Exception the exception
491 @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
492 dependsOnMethods = {"updateNotAllowed"})
493 public void updateActions(String testName) throws Exception {
496 setupUpdate(testName);
498 Permission permToUpdate = new Permission();
499 permToUpdate.setCsid(knownResourceId);
500 permToUpdate.setResourceName(knownResource);
501 // Update the content of this resource.
502 List<PermissionAction> actions = PermissionFactory.createDefaultActions();
503 int default_actions = actions.size();
506 int toUpdate_actions = actions.size();
507 if (logger.isDebugEnabled()) {
508 logger.debug(testName + " no. of actions default=" + default_actions
509 + " to update =" + toUpdate_actions);
511 permToUpdate.setActions(actions);
512 if (logger.isDebugEnabled()) {
513 logger.debug(testName + " updated object\n"
514 + objectAsXmlString(permToUpdate, Permission.class));
516 PermissionClient client = new PermissionClient();
517 // Submit the request to the service and store the response.
518 ClientResponse<Permission> res = client.update(knownResourceId, permToUpdate);
519 int statusCode = res.getStatus();
520 // Check the status code of the response: does it match the expected response(s)?
521 if (logger.isDebugEnabled()) {
522 logger.debug(testName + ": status = " + statusCode);
524 Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
525 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
526 Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
528 Permission permUpdated = (Permission) res.getEntity();
529 Assert.assertNotNull(permUpdated);
530 int updated_actions = permToUpdate.getActions().size();
531 if (logger.isDebugEnabled()) {
532 logger.debug(testName + " no. of actions to update=" + toUpdate_actions
533 + " updated =" + updated_actions);
535 Assert.assertEquals(toUpdate_actions,
537 "Data in updated object did not match submitted data.");
540 // Placeholders until the three tests below can be uncommented.
541 // See Issue CSPACE-401.
544 * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#updateWithEmptyEntityBody(java.lang.String)
547 public void updateWithEmptyEntityBody(String testName) throws Exception {
548 //FIXME: Should this test really be empty? If so, please comment accordingly.
552 * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#updateWithMalformedXml(java.lang.String)
555 public void updateWithMalformedXml(String testName) throws Exception {
556 //FIXME: Should this test really be empty? If so, please comment accordingly.
560 * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#updateWithWrongXmlSchema(java.lang.String)
563 public void updateWithWrongXmlSchema(String testName) throws Exception {
564 //FIXME: Should this test really be empty? If so, please comment accordingly.
568 * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#updateNonExistent(java.lang.String)
571 @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
572 dependsOnMethods = {"readNonExistent", "testSubmitRequest"})
573 public void updateNonExistent(String testName) throws Exception {
576 setupUpdateNonExistent(testName);
578 // Submit the request to the service and store the response.
580 // Note: The ID used in this 'create' call may be arbitrary.
581 // The only relevant ID may be the one used in updatePermission(), below.
582 PermissionClient client = new PermissionClient();
583 List<PermissionAction> actions = PermissionFactory.createDefaultActions();
584 Permission permission = createPermissionInstance("test-acquisitions",
585 "default permissions for test-acquisitions",
591 ClientResponse<Permission> res =
592 client.update(NON_EXISTENT_ID, permission);
593 int statusCode = res.getStatus();
595 // Check the status code of the response: does it match
596 // the expected response(s)?
597 if (logger.isDebugEnabled()) {
598 logger.debug(testName + ": status = " + statusCode);
600 Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
601 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
602 Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
605 // ---------------------------------------------------------------
606 // CRUD tests : DELETE tests
607 // ---------------------------------------------------------------
610 * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#delete(java.lang.String)
613 @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
614 dependsOnMethods = {"updateActions", "testSubmitRequest"})
615 public void delete(String testName) throws Exception {
618 setupDelete(testName);
620 // Submit the request to the service and store the response.
621 PermissionClient client = new PermissionClient();
622 ClientResponse<Response> res = client.delete(knownResourceId);
623 int statusCode = res.getStatus();
625 // Check the status code of the response: does it match
626 // the expected response(s)?
627 if (logger.isDebugEnabled()) {
628 logger.debug(testName + ": status = " + statusCode);
630 Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
631 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
632 Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
637 * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#deleteNonExistent(java.lang.String)
640 @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
641 dependsOnMethods = {"delete"})
642 public void deleteNonExistent(String testName) throws Exception {
645 setupDeleteNonExistent(testName);
647 // Submit the request to the service and store the response.
648 PermissionClient client = new PermissionClient();
649 ClientResponse<Response> res = client.delete(NON_EXISTENT_ID);
650 int statusCode = res.getStatus();
652 // Check the status code of the response: does it match
653 // the expected response(s)?
654 if (logger.isDebugEnabled()) {
655 logger.debug(testName + ": status = " + statusCode);
657 Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
658 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
659 Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
662 // ---------------------------------------------------------------
663 // Utility tests : tests of code used in tests above
664 // ---------------------------------------------------------------
666 * Tests the code for manually submitting data that is used by several
667 * of the methods above.
670 @Test(dependsOnMethods = {"create"})
671 public void testSubmitRequest() throws Exception {
673 // Expected status code: 200 OK
674 final int EXPECTED_STATUS = Response.Status.OK.getStatusCode();
676 // Submit the request to the service and store the response.
677 String method = ServiceRequestType.READ.httpMethodName();
678 String url = getResourceURL(knownResourceId);
679 int statusCode = submitRequest(method, url);
681 // Check the status code of the response: does it match
682 // the expected response(s)?
683 if (logger.isDebugEnabled()) {
684 logger.debug("testSubmitRequest: url=" + url
685 + " status=" + statusCode);
687 Assert.assertEquals(statusCode, EXPECTED_STATUS);
691 // ---------------------------------------------------------------
692 // Utility methods used by tests above
693 // ---------------------------------------------------------------
695 * create permission instance
696 * @param resourceName
698 * @param actionList list of actions for this permission
699 * @param effect effect of the permission
700 * @param useResourceName
705 public static Permission createPermissionInstance(String resourceName,
707 List<PermissionAction> actionList,
709 boolean useResourceName,
713 Permission permission = PermissionFactory.createPermissionInstance(resourceName,
714 description, actionList, effect,
715 useResourceName, useAction, useEffect);
717 if (logger.isDebugEnabled()) {
718 logger.debug("to be created, permission");
719 logger.debug(objectAsXmlString(permission, Permission.class));
727 * @param testName the test name
728 * @param list the list
731 private int printList(String testName, PermissionsList list) {
735 for (Permission permission : list.getPermissions()) {
736 logger.debug(testName + " permission csid=" + permission.getCsid()
737 + " name=" + permission.getResourceName()
738 + " desc=" + permission.getDescription());