]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-3270,CSPACE-4172,CSPACE-3332,CSPACE-1018: Updated Contact schema to reflect...
authorAron Roberts <aron@socrates.berkeley.edu>
Tue, 20 Sep 2011 23:31:39 +0000 (23:31 +0000)
committerAron Roberts <aron@socrates.berkeley.edu>
Tue, 20 Sep 2011 23:31:39 +0000 (23:31 +0000)
17 files changed:
services/common/src/main/cspace/config/services/tenants/tenant-bindings-proto.xml
services/contact/3rdparty/nuxeo-platform-cs-contact/src/main/resources/schemas/contacts_common.xsd
services/contact/client/pom.xml
services/contact/client/src/main/java/org/collectionspace/services/client/AuthorityWithContactsClient.java
services/contact/client/src/main/java/org/collectionspace/services/client/AuthorityWithContactsClientImpl.java
services/contact/client/src/main/java/org/collectionspace/services/client/AuthorityWithContactsProxy.java
services/contact/client/src/main/java/org/collectionspace/services/client/ContactClient.java
services/contact/client/src/main/java/org/collectionspace/services/client/ContactClientUtils.java
services/contact/client/src/main/java/org/collectionspace/services/client/ContactProxy.java
services/contact/client/src/test/java/org/collectionspace/services/client/test/ContactServiceTest.java
services/contact/jaxb/src/main/java/org/collectionspace/services/contact/ContactJAXBSchema.java
services/contact/jaxb/src/main/resources/contacts-common.xsd
services/contact/service/src/main/java/org/collectionspace/services/contact/AuthorityResourceWithContacts.java
services/contact/service/src/main/java/org/collectionspace/services/contact/nuxeo/ContactDocumentModelHandler.java
services/location/client/src/test/java/org/collectionspace/services/client/test/LocationAuthorityServiceTest.java
services/organization/client/src/test/java/org/collectionspace/services/client/test/OrgAuthorityServiceTest.java
services/person/client/src/test/java/org/collectionspace/services/client/test/PersonAuthorityServiceTest.java

index 8cf60d6eef1c8056f9cff6ea3ce2707fea57ddfa..dc32e07b17bd7806a628a574f68bb6a50a96ec5a 100644 (file)
             </service:uriPath>-->
       <service:repositoryDomain xmlns:service="http://collectionspace.org/services/common/service">default-domain</service:repositoryDomain>
       <service:documentHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.contact.nuxeo.ContactDocumentModelHandler</service:documentHandler>
+      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/common/service">
+        <service:params>
+          <service:ListResultsFields>
+            <service:ListResultField>
+              <service:element>displayName</service:element>
+              <service:xpath>displayName</service:xpath>
+            </service:ListResultField>
+           </service:ListResultsFields>
+        </service:params>
+      </service:DocHandlerParams>
       <service:object xmlns:service="http://collectionspace.org/services/common/service" name="Contact" version="0.1">
         <service:part id="0" control_group="Managed" versionable="true" auditable="false" label="contacts-system" updated="" order="0">
           <service:content contentType="application/xml">
index 54cf1ca3b8f1bdc68912ace7386705e1e734035e..008f37ebe0c0c99c6de4140cb77a738ee0600147 100644 (file)
     <xs:element name="csid" type="xs:string" />
     <xs:element name="inAuthority" type="xs:string" />
     <xs:element name="inItem" type="xs:string" />
+    <xs:element name="displayName" type="xs:string" />
+    
+    <xs:element name="emailGroupList" type="emailGroupList"/>
+    <xs:element name="telephoneNumberGroupList" type="telephoneNumberGroupList"/>
+    <xs:element name="faxNumberGroupList" type="faxNumberGroupList"/>
+    <xs:element name="webAddressGroupList" type="webAddressGroupList"/>
+    <xs:element name="addressGroupList" type="addressGroupList"/>
+    
+    <xs:complexType name="emailGroupList">
+        <xs:sequence>
+            <xs:element name="emailGroup" type="emailGroup" minOccurs="0" maxOccurs="unbounded"/>
+        </xs:sequence>
+    </xs:complexType>
 
-    <xs:element name="addressType" type="xs:string"/>
-    <xs:element name="addressPlace" type="xs:string"/>
-    <!-- FIXME After release 1.0, four additional fields are introduced here, -->
-    <!-- and these fields, plus addressType and addressPlace, constitute a -->
-    <!-- repeatable group. -->
+    <xs:complexType name="emailGroup">
+        <xs:sequence>
+            <xs:element name="email" type="xs:string"/>
+            <xs:element name="emailType" type="xs:string"/>
+        </xs:sequence>
+    </xs:complexType>
+    
+    <xs:complexType name="telephoneNumberGroupList">
+        <xs:sequence>
+            <xs:element name="telephoneNumberGroup" type="telephoneNumberGroup" minOccurs="0" maxOccurs="unbounded"/>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="telephoneNumberGroup">
+        <xs:sequence>
+            <xs:element name="telephoneNumber" type="xs:string"/>
+            <xs:element name="telephoneNumberType" type="xs:string"/>
+        </xs:sequence>
+    </xs:complexType>
+    
+    <xs:complexType name="faxNumberGroupList">
+        <xs:sequence>
+            <xs:element name="faxNumberGroup" type="faxNumberGroup" minOccurs="0" maxOccurs="unbounded"/>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="faxNumberGroup">
+        <xs:sequence>
+            <xs:element name="faxNumber" type="xs:string"/>
+            <xs:element name="faxNumberType" type="xs:string"/>
+        </xs:sequence>
+    </xs:complexType>
+    
+    <xs:complexType name="webAddressGroupList">
+        <xs:sequence>
+            <xs:element name="webAddressGroup" type="webAddressGroup" minOccurs="0" maxOccurs="unbounded"/>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="webAddressGroup">
+        <xs:sequence>
+            <xs:element name="webAddress" type="xs:string"/>
+            <xs:element name="webAddressType" type="xs:string"/>
+        </xs:sequence>
+    </xs:complexType>
+    
+    <xs:complexType name="addressGroupList">
+        <xs:sequence>
+            <xs:element name="addressGroup" type="addressGroup" minOccurs="0" maxOccurs="unbounded"/>
+        </xs:sequence>
+    </xs:complexType>
 
-    <xs:element name="web" type="xs:string"/>
-    <xs:element name="email" type="xs:string"/>
-    <xs:element name="telephoneNumber" type="xs:string"/>
-    <xs:element name="faxNumber" type="xs:string"/>
+    <xs:complexType name="addressGroup">
+        <xs:sequence>
+            <xs:element name="addressPlace1" type="xs:string"/>
+            <xs:element name="addressPlace2" type="xs:string"/>
+            <xs:element name="addressMunicipality" type="xs:string"/>
+            <xs:element name="addressStateOrProvince" type="xs:string"/>
+            <xs:element name="addressPostCode" type="xs:string"/>
+            <xs:element name="addressCountry" type="xs:string"/>
+            <xs:element name="addressType" type="xs:string"/>
+        </xs:sequence>
+    </xs:complexType>
     
 </xs:schema>
index b5548ecab3e9c09ab8c6158e482d911291a16e83..f76eda645541ac03de04ceccf8c7e42d29db40ca 100644 (file)
             <artifactId>org.collectionspace.services.client</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.collectionspace.services</groupId>
+            <artifactId>org.collectionspace.services.common</artifactId>
+            <version>${project.version}</version>
+        </dependency>
         <!-- External dependencies -->
         <dependency>
             <groupId>dom4j</groupId>
index 5564f0723c92a5f5834db4efd228c31f4b95a36a..ee79558023f07177f3260d8980e42fd6743ce552 100644 (file)
@@ -2,7 +2,6 @@ package org.collectionspace.services.client;
 \r
 import javax.ws.rs.core.Response;\r
 \r
-import org.collectionspace.services.contact.ContactsCommonList;\r
 import org.collectionspace.services.jaxb.AbstractCommonList;\r
 import org.jboss.resteasy.client.ClientResponse;\r
 \r
@@ -121,7 +120,7 @@ public interface AuthorityWithContactsClient<P extends AuthorityProxy>
      * @param itemcsid the itemcsid\r
      * @return the client response\r
      */\r
-    public ClientResponse<ContactsCommonList> readContactList(String parentcsid,\r
+    public ClientResponse<AbstractCommonList> readContactList(String parentcsid,\r
             String itemcsid);\r
     \r
     /**\r
@@ -131,7 +130,7 @@ public interface AuthorityWithContactsClient<P extends AuthorityProxy>
      * @param itemspecifier (shortIdentifier)\r
      * @return the client response\r
      */\r
-    public ClientResponse<ContactsCommonList> readContactListForNamedItem(\r
+    public ClientResponse<AbstractCommonList> readContactListForNamedItem(\r
                String parentcsid,\r
                String itemspecifier);\r
 \r
@@ -142,7 +141,7 @@ public interface AuthorityWithContactsClient<P extends AuthorityProxy>
      * @param itemcsid\r
      * @return the client response\r
      */\r
-    public ClientResponse<ContactsCommonList> readContactListForItemInNamedAuthority(\r
+    public ClientResponse<AbstractCommonList> readContactListForItemInNamedAuthority(\r
                String parentspecifier,\r
                String itemcsid);\r
 \r
@@ -153,7 +152,7 @@ public interface AuthorityWithContactsClient<P extends AuthorityProxy>
      * @param itemspecifier (shortIdentifier)\r
      * @return the client response\r
      */\r
-    public ClientResponse<ContactsCommonList> readContactListForNamedItemInNamedAuthority(\r
+    public ClientResponse<AbstractCommonList> readContactListForNamedItemInNamedAuthority(\r
                String parentspecifier,\r
                String itemspecifier);\r
 \r
index 092ffb1d4f7dff02657486a7682a0d27235d0153..9dd97a07072e328ef4a73c6db7b07484d371729d 100644 (file)
@@ -3,7 +3,6 @@ package org.collectionspace.services.client;
 import javax.ws.rs.core.Response;\r
 import org.jboss.resteasy.client.ClientResponse;\r
 \r
-import org.collectionspace.services.contact.ContactsCommonList;\r
 import org.collectionspace.services.jaxb.AbstractCommonList;\r
 \r
 /*\r
@@ -140,7 +139,7 @@ public abstract class AuthorityWithContactsClientImpl<P extends AuthorityWithCon
      * @return the client response\r
      */\r
     @Override\r
-       public ClientResponse<ContactsCommonList> readContactList(String parentcsid,\r
+       public ClientResponse<AbstractCommonList> readContactList(String parentcsid,\r
             String itemcsid) {\r
         return getProxy().readContactList(parentcsid, itemcsid);\r
     }\r
@@ -153,7 +152,7 @@ public abstract class AuthorityWithContactsClientImpl<P extends AuthorityWithCon
      * @return the client response\r
      */\r
     @Override\r
-       public ClientResponse<ContactsCommonList> readContactListForNamedItem(\r
+       public ClientResponse<AbstractCommonList> readContactListForNamedItem(\r
                String parentcsid,\r
                String itemspecifier){\r
        return getProxy().readContactList(parentcsid, itemspecifier);\r
@@ -167,7 +166,7 @@ public abstract class AuthorityWithContactsClientImpl<P extends AuthorityWithCon
      * @return the client response\r
      */\r
     @Override\r
-       public ClientResponse<ContactsCommonList> readContactListForItemInNamedAuthority(\r
+       public ClientResponse<AbstractCommonList> readContactListForItemInNamedAuthority(\r
                String parentspecifier,\r
                String itemcsid){\r
        return getProxy().readContactList(parentspecifier, itemcsid);\r
@@ -181,7 +180,7 @@ public abstract class AuthorityWithContactsClientImpl<P extends AuthorityWithCon
      * @return the client response\r
      */\r
     @Override\r
-       public ClientResponse<ContactsCommonList> readContactListForNamedItemInNamedAuthority(\r
+       public ClientResponse<AbstractCommonList> readContactListForNamedItemInNamedAuthority(\r
                String parentspecifier,\r
                String itemspecifier){\r
        return getProxy().readContactList(parentspecifier, itemspecifier);\r
index 8b57e3ae93f88bf9036d971b94eb411a01932362..c31f4bb188c2a934a940d8fc65db6762b3e2a231 100644 (file)
@@ -9,7 +9,7 @@ import javax.ws.rs.PathParam;
 import javax.ws.rs.Produces;\r
 import javax.ws.rs.core.Response;\r
 \r
-import org.collectionspace.services.contact.ContactsCommonList;\r
+import org.collectionspace.services.jaxb.AbstractCommonList;\r
 import org.jboss.resteasy.client.ClientResponse;\r
 \r
 /*\r
@@ -20,27 +20,27 @@ public interface AuthorityWithContactsProxy extends AuthorityProxy {
     @GET\r
     @Produces({"application/xml"})\r
     @Path("/{parentcsid}/items/{itemcsid}/contacts/")\r
-    public ClientResponse<ContactsCommonList> readContactList(\r
+    public ClientResponse<AbstractCommonList> readContactList(\r
             @PathParam("parentcsid") String parentcsid,\r
             @PathParam("itemcsid") String itemcsid);\r
 \r
     @GET\r
     @Produces({"application/xml"})\r
     @Path("/{parentcsid}/items/urn:cspace:name({itemspecifier})/contacts/")\r
-    ClientResponse<ContactsCommonList> readContactListForNamedItem(\r
+    ClientResponse<AbstractCommonList> readContactListForNamedItem(\r
             @PathParam("parentcsid") String parentcsid,\r
             @PathParam("itemspecifier") String itemspecifier);\r
     \r
     @GET\r
     @Produces({"application/xml"})\r
     @Path("/urn:cspace:name({parentspecifier})/items/{itemcsid}/contacts/")\r
-    ClientResponse<ContactsCommonList> readContactListForItemInNamedAuthority(\r
+    ClientResponse<AbstractCommonList> readContactListForItemInNamedAuthority(\r
             @PathParam("parentspecifier") String parentspecifier,\r
             @PathParam("itemcsid") String itemcsid);\r
     @GET\r
     @Produces({"application/xml"})\r
     @Path("/urn:cspace:name({parentspecifier})/items/urn:cspace:name({itemspecifier})/contacts/")\r
-    ClientResponse<ContactsCommonList> readContactListForNamedItemInNamedAuthority(\r
+    ClientResponse<AbstractCommonList> readContactListForNamedItemInNamedAuthority(\r
             @PathParam("parentspecifier") String parentspecifier,\r
             @PathParam("itemspecifier") String itemspecifier);\r
 \r
index fd4804688d08962536c865beee390c8003a22c66..2471a8e8eb026c505066e9c4d0d9c0d045e086ab 100644 (file)
  */
 package org.collectionspace.services.client;
 
-import org.jboss.resteasy.client.ClientResponse;
-import org.collectionspace.services.contact.ContactsCommonList;
-
 /**
  * ContactClient.java
  *
  * $LastChangedRevision: $
  * $LastChangedDate: $
  */
-public class ContactClient extends AbstractPoxServiceClientImpl<ContactsCommonList, ContactProxy> {
-       public static final String SERVICE_NAME = "contacts";
-       public static final String SERVICE_PATH_COMPONENT = SERVICE_NAME;       
-       public static final String SERVICE_PATH = "/" + SERVICE_PATH_COMPONENT;
-       public static final String SERVICE_PATH_PROXY = SERVICE_PATH + "/";     
-       public static final String SERVICE_PAYLOAD_NAME = SERVICE_NAME;
+public class ContactClient extends AbstractCommonListPoxServiceClientImpl<ContactProxy> {
 
-       @Override
-       public String getServiceName() {
-               return SERVICE_NAME;
-       }
-       
-       @Override
-       public String getServicePathComponent() {
-        return SERVICE_PATH_COMPONENT;
-       }
+    public static final String SERVICE_NAME = "contacts";
+    public static final String SERVICE_PATH_COMPONENT = SERVICE_NAME;
+    public static final String SERVICE_PATH = "/" + SERVICE_PATH_COMPONENT;
+    public static final String SERVICE_PATH_PROXY = SERVICE_PATH + "/";
+    public static final String SERVICE_PAYLOAD_NAME = SERVICE_NAME;
+
+    @Override
+    public String getServiceName() {
+        return SERVICE_NAME;
+    }
 
-       @Override
-       public Class<ContactProxy> getProxyClass() {
-               return ContactProxy.class;
-       }
+    @Override
+    public String getServicePathComponent() {
+        return SERVICE_PATH_COMPONENT;
+    }
 
-       /*
-        * Service calls
-        */
-       
-    /**
-     * @return
-     * @see org.collectionspace.services.client.Contact#getContact()
-     */
-    public ClientResponse<ContactsCommonList> readList() {
-        return getProxy().readList();
+    @Override
+    public Class<ContactProxy> getProxyClass() {
+        return ContactProxy.class;
     }
 }
index 39d173de4d188c64d71c06f8b845f0b15485666b..4ad1c158ea4622cb1260ae8d80d42e451387d8a1 100644 (file)
@@ -1,10 +1,14 @@
 package org.collectionspace.services.client;
 
+import java.util.List;
 import javax.ws.rs.core.MediaType;
 
 import org.collectionspace.services.client.ContactClient;
+import org.collectionspace.services.contact.AddressGroup;
+import org.collectionspace.services.contact.AddressGroupList;
 import org.collectionspace.services.contact.ContactsCommon;
-//import org.jboss.resteasy.plugins.providers.multipart.OutputPart;
+import org.collectionspace.services.contact.EmailGroup;
+import org.collectionspace.services.contact.EmailGroupList;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -20,9 +24,9 @@ public class ContactClientUtils {
         return createContactInstance(
             inAuthority,
             inItem,
+            "email-" + identifier,
             "addressType-" + identifier,
             "addressPlace-" + identifier,
-            "emakl-" + identifier,
             headerLabel);
     }
 
@@ -31,21 +35,35 @@ public class ContactClientUtils {
         return createContactInstance(
             inAuthority,
             inItem,
+            "email-" + identifier,
             "addressType-" + identifier,
             "addressPlace-" + identifier,
-            "emakl-" + identifier,
             headerLabel);
     }
 
     public static PoxPayloadOut createContactInstance(
-        String inAuthority, String inItem, String addressType,
-        String addressPlace, String email, String headerLabel) {
+        String inAuthority, String inItem, String email,
+        String addressType, String addressPlace, String headerLabel) {
         ContactsCommon contact = new ContactsCommon();
+        
         contact.setInAuthority(inAuthority);
         contact.setInItem(inItem);
-        contact.setAddressType(addressType);
-        contact.setAddressPlace(addressPlace);
-        contact.setEmail(email);
+        
+        EmailGroupList emailGroupList = new EmailGroupList();
+        List<EmailGroup> emailGroups = emailGroupList.getEmailGroup();
+        EmailGroup emailGroup = new EmailGroup();
+        emailGroup.setEmail(email);
+        emailGroups.add(emailGroup);
+        contact.setEmailGroupList(emailGroupList);
+        
+        AddressGroupList addressGroupList = new AddressGroupList();
+        List<AddressGroup> addressGroups = addressGroupList.getAddressGroup();
+        AddressGroup addressGroup = new AddressGroup();
+        addressGroup.setAddressType(addressType);
+        addressGroup.setAddressPlace1(addressPlace);
+        addressGroups.add(addressGroup);
+        contact.setAddressGroupList(addressGroupList);
+        
         PoxPayloadOut multipart = new PoxPayloadOut(ContactClient.SERVICE_PAYLOAD_NAME);
         @SuppressWarnings("deprecation")
                PayloadOutputPart commonPart =
@@ -53,13 +71,7 @@ public class ContactClientUtils {
 //        ContactClient client = new ContactClient();
         commonPart.setLabel(headerLabel);
 
-        if(logger.isDebugEnabled()){
-            logger.debug("to be created, contact common");
-            // logger.debug(objectAsXmlString(contact, ContactsCommon.class));
-        }
-
         return multipart;
     }
 
-
 }
index 274719c24e8edc42f54bbecf64b283ad1c4ba29f..8fe639449fc462b9adc442a347fe0603acc5e03e 100644 (file)
@@ -1,35 +1,33 @@
+/**    
+ * This document is a part of the source code and related artifacts
+ * for CollectionSpace, an open source collections management system
+ * for museums and related institutions:
+ *
+ * http://www.collectionspace.org
+ * http://wiki.collectionspace.org
+ *
+ * Copyright (c) 2009 Regents of the University of California
+ *
+ * Licensed under the Educational Community License (ECL), Version 2.0.
+ * You may not use this file except in compliance with this License.
+ *
+ * You may obtain a copy of the ECL 2.0 License at
+ * https://source.collectionspace.org/collection-space/LICENSE.txt
+ */
 package org.collectionspace.services.client;
 
-import org.jboss.resteasy.client.ClientResponse;
 import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
 import javax.ws.rs.Path;
 import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-
-import org.collectionspace.services.client.workflow.WorkflowClient;
-import org.collectionspace.services.contact.ContactsCommonList;
 
 /**
- * @version $Revision:$
+ * ContactProxy.java
+ *
+ * $LastChangedRevision: $
+ * $LastChangedDate: $
  */
 @Path(ContactClient.SERVICE_PATH_PROXY)
 @Produces({"application/xml"})
 @Consumes({"application/xml"})
-public interface ContactProxy extends CollectionSpacePoxProxy<ContactsCommonList> {
-    @GET
-    ClientResponse<ContactsCommonList> readList();
-
-    @Override
-       @GET
-    @Produces({"application/xml"})
-    ClientResponse<ContactsCommonList> readIncludeDeleted(
-            @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);
-            
-    @Override
-    @GET
-    @Produces({"application/xml"})
-    ClientResponse<ContactsCommonList> keywordSearchIncludeDeleted(
-               @QueryParam(IQueryManager.SEARCH_TYPE_KEYWORDS_KW) String keywords,
-            @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted);
+public interface ContactProxy extends CollectionSpaceCommonListPoxProxy {
 }
index 3999e93e204874ea9181daae9a237d0fec9da2ed..9b9b0445c1a28846658dadf2c75c7a6e57edb7ef 100644 (file)
@@ -32,15 +32,17 @@ import org.collectionspace.services.client.ContactClientUtils;
 import org.collectionspace.services.client.PayloadOutputPart;
 import org.collectionspace.services.client.PoxPayloadIn;
 import org.collectionspace.services.client.PoxPayloadOut;
+import org.collectionspace.services.common.AbstractCommonListUtils;
+import org.collectionspace.services.contact.AddressGroup;
+import org.collectionspace.services.contact.AddressGroupList;
 import org.collectionspace.services.contact.ContactsCommon;
-import org.collectionspace.services.contact.ContactsCommonList;
+import org.collectionspace.services.contact.EmailGroup;
+import org.collectionspace.services.contact.EmailGroupList;
 import org.collectionspace.services.jaxb.AbstractCommonList;
 
 import org.jboss.resteasy.client.ClientResponse;
-//import org.jboss.resteasy.plugins.providers.multipart.OutputPart;
 
 import org.testng.Assert;
-import org.testng.annotations.AfterClass;
 import org.testng.annotations.Test;
 
 import org.slf4j.Logger;
@@ -54,39 +56,38 @@ import org.slf4j.LoggerFactory;
  * $LastChangedDate: 2009-11-06 12:20:28 -0800 (Fri, 06 Nov 2009) $
  */
 public class ContactServiceTest extends AbstractServiceTestImpl {
+
     private final String CLASS_NAME = ContactServiceTest.class.getName();
     private final Logger logger = LoggerFactory.getLogger(ContactServiceTest.class);
-
     // Instance variables specific to this test.
 //    final String SERVICE_PATH_COMPONENT = "contacts";
-    
     private String knownResourceId = null;
 
-       @Override
-       public String getServicePathComponent() {
-               return ContactClient.SERVICE_PATH_COMPONENT;
-       }
+    @Override
+    public String getServicePathComponent() {
+        return ContactClient.SERVICE_PATH_COMPONENT;
+    }
+
+    @Override
+    protected String getServiceName() {
+        return ContactClient.SERVICE_NAME;
+    }
 
-       @Override
-       protected String getServiceName() {
-               return ContactClient.SERVICE_NAME;
-       }
-    
     /* (non-Javadoc)
      * @see org.collectionspace.services.client.test.BaseServiceTest#getClientInstance()
      */
     @Override
     protected CollectionSpaceClient getClientInstance() {
-       return new ContactClient();
+        return new ContactClient();
     }
-    
+
     /* (non-Javadoc)
      * @see org.collectionspace.services.client.test.BaseServiceTest#getAbstractCommonList(org.jboss.resteasy.client.ClientResponse)
      */
     @Override
-       protected AbstractCommonList getAbstractCommonList(
-                       ClientResponse<AbstractCommonList> response) {
-        return response.getEntity(ContactsCommonList.class);
+    protected AbstractCommonList getAbstractCommonList(
+            ClientResponse<AbstractCommonList> response) {
+        return response.getEntity(AbstractCommonList.class);
     }
 
 //    @Override
@@ -96,13 +97,12 @@ public class ContactServiceTest extends AbstractServiceTestImpl {
 //            ContactClientUtils.createContactInstance(identifier, client.getCommonPartName());
 //        return multipart;
 //    }
-        
     // ---------------------------------------------------------------
     // CRUD tests : CREATE tests
     // ---------------------------------------------------------------
     // Success outcomes
     @Override
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class)
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class)
     public void create(String testName) throws Exception {
 
         if (logger.isDebugEnabled()) {
@@ -117,7 +117,7 @@ public class ContactServiceTest extends AbstractServiceTestImpl {
         ContactClient client = new ContactClient();
         String identifier = createIdentifier();
         PoxPayloadOut multipart =
-            ContactClientUtils.createContactInstance(identifier, client.getCommonPartName());
+                ContactClientUtils.createContactInstance(identifier, client.getCommonPartName());
         ClientResponse<Response> res = client.create(multipart);
 
         int statusCode = res.getStatus();
@@ -128,7 +128,7 @@ public class ContactServiceTest extends AbstractServiceTestImpl {
         // Specifically:
         // Does it fall within the set of valid status codes?
         // Does it exactly match the expected status code?
-        if(logger.isDebugEnabled()){
+        if (logger.isDebugEnabled()) {
             logger.debug(testName + ": status = " + statusCode);
         }
         Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
@@ -137,7 +137,7 @@ public class ContactServiceTest extends AbstractServiceTestImpl {
 
         // Store the ID returned from the first resource created
         // for additional tests below.
-        if (knownResourceId == null){
+        if (knownResourceId == null) {
             knownResourceId = extractId(res);
             if (logger.isDebugEnabled()) {
                 logger.debug(testName + ": knownResourceId=" + knownResourceId);
@@ -150,10 +150,10 @@ public class ContactServiceTest extends AbstractServiceTestImpl {
     }
 
     @Override
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        dependsOnMethods = {"create"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    dependsOnMethods = {"create"})
     public void createList(String testName) throws Exception {
-        for(int i = 0; i < 3; i++){
+        for (int i = 0; i < 3; i++) {
             create(testName);
         }
     }
@@ -163,115 +163,114 @@ public class ContactServiceTest extends AbstractServiceTestImpl {
     // See Issue CSPACE-401.
     @Override
     public void createWithEmptyEntityBody(String testName) throws Exception {
-       //Should this really be empty?
+        //Should this really be empty?
     }
 
     @Override
     public void createWithMalformedXml(String testName) throws Exception {
-       //Should this really be empty??
+        //Should this really be empty??
     }
 
     @Override
     public void createWithWrongXmlSchema(String testName) throws Exception {
-       //Should this really be empty??
+        //Should this really be empty??
     }
 
     /*
     @Override
     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
-        dependsOnMethods = {"create", "testSubmitRequest"})
+    dependsOnMethods = {"create", "testSubmitRequest"})
     public void createWithEmptyEntityBody(String testName) throws Exception {
-
-        if (logger.isDebugEnabled()) {
-            logger.debug(testBanner(testName, CLASS_NAME));
-        }
-        // Perform setup.
-        setupCreateWithEmptyEntityBody(testName, logger);
-
-        // Submit the request to the service and store the response.
-        String method = REQUEST_TYPE.httpMethodName();
-        String url = getServiceRootURL();
-        String mediaType = MediaType.APPLICATION_XML;
-        final String entity = "";
-        int statusCode = submitRequest(method, url, mediaType, entity);
-
-        // Check the status code of the response: does it match
-        // the expected response(s)?
-        if(logger.isDebugEnabled()){
-            logger.debug("createWithEmptyEntityBody url=" + url +
-                " status=" + statusCode);
-         }
-        Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-        invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-        Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+    
+    if (logger.isDebugEnabled()) {
+    logger.debug(testBanner(testName, CLASS_NAME));
     }
-
+    // Perform setup.
+    setupCreateWithEmptyEntityBody(testName, logger);
+    
+    // Submit the request to the service and store the response.
+    String method = REQUEST_TYPE.httpMethodName();
+    String url = getServiceRootURL();
+    String mediaType = MediaType.APPLICATION_XML;
+    final String entity = "";
+    int statusCode = submitRequest(method, url, mediaType, entity);
+    
+    // Check the status code of the response: does it match
+    // the expected response(s)?
+    if(logger.isDebugEnabled()){
+    logger.debug("createWithEmptyEntityBody url=" + url +
+    " status=" + statusCode);
+    }
+    Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+    Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+    }
+    
     @Override
     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
-        dependsOnMethods = {"create", "testSubmitRequest"})
+    dependsOnMethods = {"create", "testSubmitRequest"})
     public void createWithMalformedXml(String testName) throws Exception {
-
-        if (logger.isDebugEnabled()) {
-            logger.debug(testBanner(testName, CLASS_NAME));
-        }
-        // Perform setup.
-        setupCreateWithMalformedXml();
-
-        // Submit the request to the service and store the response.
-        String method = REQUEST_TYPE.httpMethodName();
-        String url = getServiceRootURL();
-        String mediaType = MediaType.APPLICATION_XML;
-        final String entity = MALFORMED_XML_DATA; // Constant from base class.
-        int statusCode = submitRequest(method, url, mediaType, entity);
-
-        // Check the status code of the response: does it match
-        // the expected response(s)?
-        if(logger.isDebugEnabled()){
-            logger.debug(testName + ": url=" + url +
-                " status=" + statusCode);
-         }
-        Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-        invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-        Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+    
+    if (logger.isDebugEnabled()) {
+    logger.debug(testBanner(testName, CLASS_NAME));
     }
-
+    // Perform setup.
+    setupCreateWithMalformedXml();
+    
+    // Submit the request to the service and store the response.
+    String method = REQUEST_TYPE.httpMethodName();
+    String url = getServiceRootURL();
+    String mediaType = MediaType.APPLICATION_XML;
+    final String entity = MALFORMED_XML_DATA; // Constant from base class.
+    int statusCode = submitRequest(method, url, mediaType, entity);
+    
+    // Check the status code of the response: does it match
+    // the expected response(s)?
+    if(logger.isDebugEnabled()){
+    logger.debug(testName + ": url=" + url +
+    " status=" + statusCode);
+    }
+    Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+    Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+    }
+    
     @Override
     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
-        dependsOnMethods = {"create", "testSubmitRequest"})
+    dependsOnMethods = {"create", "testSubmitRequest"})
     public void createWithWrongXmlSchema(String testName) throws Exception {
-
-        if (logger.isDebugEnabled()) {
-            logger.debug(testBanner(testName, CLASS_NAME));
-        }
-        // Perform setup.
-        setupCreateWithWrongXmlSchema(testName, logger);
-
-        // Submit the request to the service and store the response.
-        String method = REQUEST_TYPE.httpMethodName();
-        String url = getServiceRootURL();
-        String mediaType = MediaType.APPLICATION_XML;
-        final String entity = WRONG_XML_SCHEMA_DATA;
-        int statusCode = submitRequest(method, url, mediaType, entity);
-
-        // Check the status code of the response: does it match
-        // the expected response(s)?
-        if(logger.isDebugEnabled()){
-            logger.debug(testName + ": url=" + url +
-                " status=" + statusCode);
-         }
-        Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-        invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-        Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+    
+    if (logger.isDebugEnabled()) {
+    logger.debug(testBanner(testName, CLASS_NAME));
+    }
+    // Perform setup.
+    setupCreateWithWrongXmlSchema(testName, logger);
+    
+    // Submit the request to the service and store the response.
+    String method = REQUEST_TYPE.httpMethodName();
+    String url = getServiceRootURL();
+    String mediaType = MediaType.APPLICATION_XML;
+    final String entity = WRONG_XML_SCHEMA_DATA;
+    int statusCode = submitRequest(method, url, mediaType, entity);
+    
+    // Check the status code of the response: does it match
+    // the expected response(s)?
+    if(logger.isDebugEnabled()){
+    logger.debug(testName + ": url=" + url +
+    " status=" + statusCode);
+    }
+    Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+    Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
     }
      */
-
     // ---------------------------------------------------------------
     // CRUD tests : READ tests
     // ---------------------------------------------------------------
     // Success outcomes
     @Override
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        dependsOnMethods = {"create"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    dependsOnMethods = {"create"})
     public void read(String testName) throws Exception {
 
         if (logger.isDebugEnabled()) {
@@ -287,7 +286,7 @@ public class ContactServiceTest extends AbstractServiceTestImpl {
 
         // Check the status code of the response: does it match
         // the expected response(s)?
-        if(logger.isDebugEnabled()){
+        if (logger.isDebugEnabled()) {
             logger.debug(testName + ": status = " + statusCode);
         }
         Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
@@ -302,8 +301,8 @@ public class ContactServiceTest extends AbstractServiceTestImpl {
 
     // Failure outcomes
     @Override
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        dependsOnMethods = {"read"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    dependsOnMethods = {"read"})
     public void readNonExistent(String testName) throws Exception {
 
         if (logger.isDebugEnabled()) {
@@ -319,7 +318,7 @@ public class ContactServiceTest extends AbstractServiceTestImpl {
 
         // Check the status code of the response: does it match
         // the expected response(s)?
-        if(logger.isDebugEnabled()){
+        if (logger.isDebugEnabled()) {
             logger.debug(testName + ": status = " + statusCode);
         }
         Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
@@ -332,8 +331,8 @@ public class ContactServiceTest extends AbstractServiceTestImpl {
     // ---------------------------------------------------------------
     // Success outcomes
     @Override
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        dependsOnMethods = {"read"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    dependsOnMethods = {"read"})
     public void readList(String testName) throws Exception {
 
         if (logger.isDebugEnabled()) {
@@ -344,13 +343,13 @@ public class ContactServiceTest extends AbstractServiceTestImpl {
 
         // Submit the request to the service and store the response.
         ContactClient client = new ContactClient();
-        ClientResponse<ContactsCommonList> res = client.readList();
-        ContactsCommonList list = res.getEntity();
+        ClientResponse<AbstractCommonList> res = client.readList();
+        AbstractCommonList list = res.getEntity();
         int statusCode = res.getStatus();
 
         // Check the status code of the response: does it match
         // the expected response(s)?
-        if(logger.isDebugEnabled()){
+        if (logger.isDebugEnabled()) {
             logger.debug(testName + ": status = " + statusCode);
         }
         Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
@@ -359,19 +358,8 @@ public class ContactServiceTest extends AbstractServiceTestImpl {
 
         // Optionally output additional data about list members for debugging.
         boolean iterateThroughList = false;
-        if(iterateThroughList && logger.isDebugEnabled()){
-            List<ContactsCommonList.ContactListItem> items =
-                    list.getContactListItem();
-            int i = 0;
-            for(ContactsCommonList.ContactListItem item : items){
-                logger.debug(testName + ": list-item[" + i + "] csid=" +
-                        item.getCsid());
-                logger.debug(testName + ": list-item[" + i + "] objectNumber=" +
-                        item.getAddressPlace());
-                logger.debug(testName + ": list-item[" + i + "] URI=" +
-                        item.getUri());
-                i++;
-            }
+        if (iterateThroughList && logger.isDebugEnabled()) {
+            AbstractCommonListUtils.ListItemsInAbstractCommonList(list, logger, testName);
         }
 
     }
@@ -383,8 +371,8 @@ public class ContactServiceTest extends AbstractServiceTestImpl {
     // ---------------------------------------------------------------
     // Success outcomes
     @Override
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        dependsOnMethods = {"read"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    dependsOnMethods = {"read"})
     public void update(String testName) throws Exception {
 
         if (logger.isDebugEnabled()) {
@@ -396,27 +384,56 @@ public class ContactServiceTest extends AbstractServiceTestImpl {
         // Submit the request to the service and store the response.
         ContactClient client = new ContactClient();
         ClientResponse<String> res = client.read(knownResourceId);
-        if(logger.isDebugEnabled()){
+        if (logger.isDebugEnabled()) {
             logger.debug(testName + ": read status = " + res.getStatus());
         }
         Assert.assertEquals(res.getStatus(), EXPECTED_STATUS_CODE);
 
-        if(logger.isDebugEnabled()){
+        if (logger.isDebugEnabled()) {
             logger.debug("got object to update with ID: " + knownResourceId);
         }
         PoxPayloadIn input = new PoxPayloadIn(res.getEntity());
         ContactsCommon contact = (ContactsCommon) extractPart(input,
                 client.getCommonPartName(), ContactsCommon.class);
         Assert.assertNotNull(contact);
-
-        // Update the content of this resource.
-        contact.setAddressType("updated-" + contact.getAddressType());
-        contact.setAddressPlace("updated-" + contact.getAddressPlace());
-        contact.setEmail("updated-" + contact.getEmail());
+        
         if(logger.isDebugEnabled()){
+            logger.debug("contact common before updating");
+            logger.debug(BaseServiceTest.objectAsXmlString(contact, ContactsCommon.class));
+        }
+
+        // Verify the contents of this resource
+        EmailGroupList emailGroupList = contact.getEmailGroupList();
+        Assert.assertNotNull(emailGroupList);
+        List<EmailGroup> emailGroups = emailGroupList.getEmailGroup();
+        Assert.assertNotNull(emailGroups);
+        Assert.assertTrue(emailGroups.size() > 0);
+        String email = emailGroups.get(0).getEmail();
+        Assert.assertNotNull(email);
+
+        AddressGroupList addressGroupList = contact.getAddressGroupList();
+        Assert.assertNotNull(addressGroupList);
+        List<AddressGroup> addressGroups = addressGroupList.getAddressGroup();
+        Assert.assertNotNull(addressGroups);
+        Assert.assertTrue(addressGroups.size() > 0);
+        String addressType = addressGroups.get(0).getAddressType();
+        String addressPlace1 = addressGroups.get(0).getAddressPlace1();
+        Assert.assertNotNull(addressType);
+        Assert.assertNotNull(addressPlace1);
+
+        // Update the contents of this resource.
+        emailGroups.get(0).setEmail("updated-" + email);
+        contact.setEmailGroupList(emailGroupList);
+
+        addressGroups.get(0).setAddressType("updated-" + addressType);
+        addressGroups.get(0).setAddressPlace1("updated-" + addressPlace1);
+        contact.setAddressGroupList(addressGroupList);
+
+        if (logger.isDebugEnabled()) {
             logger.debug("to be updated object");
-            logger.debug(objectAsXmlString(contact, ContactsCommon.class));
+            logger.debug(BaseServiceTest.objectAsXmlString(contact, ContactsCommon.class));
         }
+        
         // Submit the request to the service and store the response.
         PoxPayloadOut output = new PoxPayloadOut(ContactClient.SERVICE_PAYLOAD_NAME);
         PayloadOutputPart commonPart = output.addPart(contact, MediaType.APPLICATION_XML_TYPE);
@@ -425,22 +442,27 @@ public class ContactServiceTest extends AbstractServiceTestImpl {
         res = client.update(knownResourceId, output);
         int statusCode = res.getStatus();
         // Check the status code of the response: does it match the expected response(s)?
-        if(logger.isDebugEnabled()){
+        if (logger.isDebugEnabled()) {
             logger.debug(testName + ": status = " + statusCode);
         }
         Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
                 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
         Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
 
-
         input = new PoxPayloadIn(res.getEntity());
         ContactsCommon updatedContact =
                 (ContactsCommon) extractPart(input,
-                        client.getCommonPartName(), ContactsCommon.class);
+                client.getCommonPartName(), ContactsCommon.class);
         Assert.assertNotNull(updatedContact);
-
-        Assert.assertEquals(updatedContact.getEmail(),
-                contact.getEmail(),
+        
+        if (logger.isDebugEnabled()) {
+            logger.debug("object after update");
+            logger.debug(objectAsXmlString(updatedContact, ContactsCommon.class));
+        }
+                
+        Assert.assertNotNull(updatedContact.getEmailGroupList().getEmailGroup().get(0));
+        Assert.assertEquals(updatedContact.getEmailGroupList().getEmailGroup().get(0).getEmail(),
+                contact.getEmailGroupList().getEmailGroup().get(0).getEmail(),
                 "Data in updated object did not match submitted data.");
 
     }
@@ -450,114 +472,113 @@ public class ContactServiceTest extends AbstractServiceTestImpl {
     // See Issue CSPACE-401.
     @Override
     public void updateWithEmptyEntityBody(String testName) throws Exception {
-       //Should this really be empty??
+        //Should this really be empty??
     }
-    
+
     /* (non-Javadoc)
      * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#updateWithMalformedXml(java.lang.String)
      */
     @Override
     public void updateWithMalformedXml(String testName) throws Exception {
-       //Should this really be empty??
+        //Should this really be empty??
     }
 
     @Override
     public void updateWithWrongXmlSchema(String testName) throws Exception {
-       //Should this really be empty??
+        //Should this really be empty??
     }
 
     /*
     @Override
     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
-        dependsOnMethods = {"create", "update", "testSubmitRequest"})
+    dependsOnMethods = {"create", "update", "testSubmitRequest"})
     public void updateWithEmptyEntityBody(String testName) throws Exception {
-
-            if (logger.isDebugEnabled()) {
-                logger.debug(testBanner(testName, CLASS_NAME));
-            }
-        // Perform setup.
-        setupUpdateWithEmptyEntityBody();
-
-        // Submit the request to the service and store the response.
-        String method = REQUEST_TYPE.httpMethodName();
-        String url = getResourceURL(knownResourceId);
-        String mediaType = MediaType.APPLICATION_XML;
-        final String entity = "";
-        int statusCode = submitRequest(method, url, mediaType, entity);
-
-        // Check the status code of the response: does it match
-        // the expected response(s)?
-        if(logger.isDebugEnabled()){
-            logger.debug(testName + ": url=" + url +
-                " status=" + statusCode);
-         }
-        Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-        invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-        Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+    
+    if (logger.isDebugEnabled()) {
+    logger.debug(testBanner(testName, CLASS_NAME));
     }
-
+    // Perform setup.
+    setupUpdateWithEmptyEntityBody();
+    
+    // Submit the request to the service and store the response.
+    String method = REQUEST_TYPE.httpMethodName();
+    String url = getResourceURL(knownResourceId);
+    String mediaType = MediaType.APPLICATION_XML;
+    final String entity = "";
+    int statusCode = submitRequest(method, url, mediaType, entity);
+    
+    // Check the status code of the response: does it match
+    // the expected response(s)?
+    if(logger.isDebugEnabled()){
+    logger.debug(testName + ": url=" + url +
+    " status=" + statusCode);
+    }
+    Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+    Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+    }
+    
     @Override
     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
-        dependsOnMethods = {"create", "update", "testSubmitRequest"})
+    dependsOnMethods = {"create", "update", "testSubmitRequest"})
     public void updateWithMalformedXml(String testName) throws Exception {
-
-        if (logger.isDebugEnabled()) {
-            logger.debug(testBanner(testName, CLASS_NAME));
-        }
-        // Perform setup.
-        setupUpdateWithMalformedXml();
-
-        // Submit the request to the service and store the response.
-        String method = REQUEST_TYPE.httpMethodName();
-        String url = getResourceURL(knownResourceId);
-        String mediaType = MediaType.APPLICATION_XML;
-        final String entity = MALFORMED_XML_DATA;
-        int statusCode = submitRequest(method, url, mediaType, entity);
-
-        // Check the status code of the response: does it match
-        // the expected response(s)?
-        if(logger.isDebugEnabled()){
-            logger.debug(testName + ": url=" + url +
-             " status=" + statusCode);
-         }
-        Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-        invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-        Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+    
+    if (logger.isDebugEnabled()) {
+    logger.debug(testBanner(testName, CLASS_NAME));
     }
-
+    // Perform setup.
+    setupUpdateWithMalformedXml();
+    
+    // Submit the request to the service and store the response.
+    String method = REQUEST_TYPE.httpMethodName();
+    String url = getResourceURL(knownResourceId);
+    String mediaType = MediaType.APPLICATION_XML;
+    final String entity = MALFORMED_XML_DATA;
+    int statusCode = submitRequest(method, url, mediaType, entity);
+    
+    // Check the status code of the response: does it match
+    // the expected response(s)?
+    if(logger.isDebugEnabled()){
+    logger.debug(testName + ": url=" + url +
+    " status=" + statusCode);
+    }
+    Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+    Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+    }
+    
     @Override
     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
-        dependsOnMethods = {"create", "update", "testSubmitRequest"})
+    dependsOnMethods = {"create", "update", "testSubmitRequest"})
     public void updateWithWrongXmlSchema(String testName) throws Exception {
-
-        if (logger.isDebugEnabled()) {
-            logger.debug(testBanner(testName, CLASS_NAME));
-        }
-        // Perform setup.
-        setupUpdateWithWrongXmlSchema(testName, logger);
-
-        // Submit the request to the service and store the response.
-        String method = REQUEST_TYPE.httpMethodName();
-        String url = getResourceURL(knownResourceId);
-        String mediaType = MediaType.APPLICATION_XML;
-        final String entity = WRONG_XML_SCHEMA_DATA;
-        int statusCode = submitRequest(method, url, mediaType, entity);
-
-        // Check the status code of the response: does it match
-        // the expected response(s)?
-        if(logger.isDebugEnabled()){
-            logger.debug(testName + ": url=" + url +
-            " status=" + statusCode);
-         }
-        Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-        invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-        Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+    
+    if (logger.isDebugEnabled()) {
+    logger.debug(testBanner(testName, CLASS_NAME));
+    }
+    // Perform setup.
+    setupUpdateWithWrongXmlSchema(testName, logger);
+    
+    // Submit the request to the service and store the response.
+    String method = REQUEST_TYPE.httpMethodName();
+    String url = getResourceURL(knownResourceId);
+    String mediaType = MediaType.APPLICATION_XML;
+    final String entity = WRONG_XML_SCHEMA_DATA;
+    int statusCode = submitRequest(method, url, mediaType, entity);
+    
+    // Check the status code of the response: does it match
+    // the expected response(s)?
+    if(logger.isDebugEnabled()){
+    logger.debug(testName + ": url=" + url +
+    " status=" + statusCode);
+    }
+    Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+    Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
     }
      */
-
     @Override
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        dependsOnMethods = {"update", "testSubmitRequest"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    dependsOnMethods = {"update", "testSubmitRequest"})
     public void updateNonExistent(String testName) throws Exception {
 
         if (logger.isDebugEnabled()) {
@@ -578,7 +599,7 @@ public class ContactServiceTest extends AbstractServiceTestImpl {
 
         // Check the status code of the response: does it match
         // the expected response(s)?
-        if(logger.isDebugEnabled()){
+        if (logger.isDebugEnabled()) {
             logger.debug(testName + ": status = " + statusCode);
         }
         Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
@@ -591,8 +612,8 @@ public class ContactServiceTest extends AbstractServiceTestImpl {
     // ---------------------------------------------------------------
     // Success outcomes
     @Override
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        dependsOnMethods = {"create", "readList", "testSubmitRequest", "update"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    dependsOnMethods = {"create", "readList", "testSubmitRequest", "update"})
     public void delete(String testName) throws Exception {
 
         if (logger.isDebugEnabled()) {
@@ -608,7 +629,7 @@ public class ContactServiceTest extends AbstractServiceTestImpl {
 
         // Check the status code of the response: does it match
         // the expected response(s)?
-        if(logger.isDebugEnabled()){
+        if (logger.isDebugEnabled()) {
             logger.debug(testName + ": status = " + statusCode);
         }
         Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
@@ -618,8 +639,8 @@ public class ContactServiceTest extends AbstractServiceTestImpl {
 
     // Failure outcomes
     @Override
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        dependsOnMethods = {"delete"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    dependsOnMethods = {"delete"})
     public void deleteNonExistent(String testName) throws Exception {
 
         if (logger.isDebugEnabled()) {
@@ -635,7 +656,7 @@ public class ContactServiceTest extends AbstractServiceTestImpl {
 
         // Check the status code of the response: does it match
         // the expected response(s)?
-        if(logger.isDebugEnabled()){
+        if (logger.isDebugEnabled()) {
             logger.debug(testName + ": status = " + statusCode);
         }
         Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
@@ -663,9 +684,9 @@ public class ContactServiceTest extends AbstractServiceTestImpl {
 
         // Check the status code of the response: does it match
         // the expected response(s)?
-        if(logger.isDebugEnabled()){
-            logger.debug("testSubmitRequest: url=" + url +
-                " status=" + statusCode);
+        if (logger.isDebugEnabled()) {
+            logger.debug("testSubmitRequest: url=" + url
+                    + " status=" + statusCode);
         }
         Assert.assertEquals(statusCode, EXPECTED_STATUS);
 
index 22834c93d1affa0250d4e7fbb6b45a42525465f0..8cd3d7aa56b67bfe09126c34baee03c932df65d9 100644 (file)
@@ -7,16 +7,20 @@ package org.collectionspace.services.contact;
  *
  */
 public interface ContactJAXBSchema {
+
     final static String CONTACTS_COMMON = "contacts_common";
     final static String CSID = "csid";
-       final static String IN_AUTHORITY = "inAuthority";
-    final static String IN_ITEM ="inItem";
+    final static String IN_AUTHORITY = "inAuthority";
+    final static String IN_ITEM = "inItem";
+    final static String DISPLAY_NAME = "displayName";
+    
+    final static String EMAIL_GROUP_LIST = "emailGroupList";
+    final static String EMAIL = "email";
+    final static String TELEPHONE_NUMBER_GROUP_LIST = "telephoneNumberGroupList";
+    final static String TELEPHONE_NUMBER = "telephoneNumber";
+    final static String FAX_NUMBER = "faxNumber";
+    final static String WEB = "web";
+    final static String ADDRESS_GROUP_LIST = "addressGroupList";
     final static String ADDRESS_TYPE = "addressType";
-       final static String ADDRESS_PLACE = "addressPlace";
-       final static String WEB = "web";
-       final static String EMAIL = "email";
-       final static String TELEPHONE_NUMBER = "telephoneNumber";
-       final static String FAX_NUMBER = "faxNumber";
+    final static String ADDRESS_PLACE_1 = "addressPlace1";
 }
-
-
index 37cc196ef1e36cdfeff4763d9ebae3b4124b8174..81ca5500888ee30be42abe3917cf4d2332924ac1 100644 (file)
                 <xs:element name="csid" type="xs:string" />
                 <xs:element name="inAuthority" type="xs:string" />
                 <xs:element name="inItem" type="xs:string" />
-                <xs:element name="addressType" type="xs:string"/>
-                <xs:element name="addressPlace" type="xs:string"/>
-                <xs:element name="web" type="xs:string"/>
-                <xs:element name="email" type="xs:string"/>
-                <xs:element name="telephoneNumber" type="xs:string"/>
-                <xs:element name="faxNumber" type="xs:string"/>
+                <xs:element name="displayName" type="xs:string"/>
+                <xs:element name="emailGroupList" type="emailGroupList"/>
+                <xs:element name="telephoneNumberGroupList" type="telephoneNumberGroupList"/>
+                <xs:element name="faxNumberGroupList" type="faxNumberGroupList"/>
+                <xs:element name="webAddressGroupList" type="webAddressGroupList"/>
+                <xs:element name="addressGroupList" type="addressGroupList"/>
             </xs:sequence>
         </xs:complexType>
     </xs:element>
     
-    <!-- This is the base class for paginated lists -->
-    <xs:complexType name="abstractCommonList">
-        <xs:annotation>
-            <xs:appinfo>
-                <jaxb:class ref="org.collectionspace.services.jaxb.AbstractCommonList"/>
-            </xs:appinfo>
-        </xs:annotation>
+    
+    <xs:complexType name="emailGroupList">
+        <xs:sequence>
+            <xs:element name="emailGroup" type="emailGroup" minOccurs="0" maxOccurs="unbounded"/>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="emailGroup">
+        <xs:sequence>
+            <xs:element name="email" type="xs:string"/>
+            <xs:element name="emailType" type="xs:string"/>
+        </xs:sequence>
     </xs:complexType>
     
-    <!-- contact records, as in Nuxeo repository -->
-    <xs:element name="contacts-common-list">
-        <xs:complexType>
-            <xs:complexContent>
-                <xs:extension base="abstractCommonList">                    
-                    <xs:sequence>
-                        <xs:element name="contact-list-item" maxOccurs="unbounded">
-                            <xs:complexType>
-                                <xs:sequence>
-                                    <xs:element name="addressPlace" type="xs:string"
-                                        minOccurs="1" />
-                                    <!-- uri to retrive contact details -->
-                                    <xs:element name="uri" type="xs:anyURI"
-                                        minOccurs="1" />
-                                    <xs:element name="csid" type="xs:string"
-                                        minOccurs="1" />
-                                </xs:sequence>
-                            </xs:complexType>
-                        </xs:element>
-                    </xs:sequence>
-                </xs:extension>
-            </xs:complexContent>                    
-        </xs:complexType>
-    </xs:element>
+    <xs:complexType name="telephoneNumberGroupList">
+        <xs:sequence>
+            <xs:element name="telephoneNumberGroup" type="telephoneNumberGroup" minOccurs="0" maxOccurs="unbounded"/>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="telephoneNumberGroup">
+        <xs:sequence>
+            <xs:element name="telephoneNumber" type="xs:string"/>
+            <xs:element name="telephoneNumberType" type="xs:string"/>
+        </xs:sequence>
+    </xs:complexType>
+    
+    <xs:complexType name="faxNumberGroupList">
+        <xs:sequence>
+            <xs:element name="faxNumberGroup" type="faxNumberGroup" minOccurs="0" maxOccurs="unbounded"/>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="faxNumberGroup">
+        <xs:sequence>
+            <xs:element name="faxNumber" type="xs:string"/>
+            <xs:element name="faxNumberType" type="xs:string"/>
+        </xs:sequence>
+    </xs:complexType>
+    
+    <xs:complexType name="webAddressGroupList">
+        <xs:sequence>
+            <xs:element name="webAddressGroup" type="webAddressGroup" minOccurs="0" maxOccurs="unbounded"/>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="webAddressGroup">
+        <xs:sequence>
+            <xs:element name="webAddress" type="xs:string"/>
+            <xs:element name="webAddressType" type="xs:string"/>
+        </xs:sequence>
+    </xs:complexType>
+    
+    <xs:complexType name="addressGroupList">
+        <xs:sequence>
+            <xs:element name="addressGroup" type="addressGroup" minOccurs="0" maxOccurs="unbounded"/>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="addressGroup">
+        <xs:sequence>
+            <xs:element name="addressPlace1" type="xs:string"/>
+            <xs:element name="addressPlace2" type="xs:string"/>
+            <xs:element name="addressMunicipality" type="xs:string"/>
+            <xs:element name="addressStateOrProvince" type="xs:string"/>
+            <xs:element name="addressPostCode" type="xs:string"/>
+            <xs:element name="addressCountry" type="xs:string"/>
+            <xs:element name="addressType" type="xs:string"/>
+        </xs:sequence>
+    </xs:complexType>
     
 </xs:schema>
 
index 949299df52df8fb5d49fa7c3ac4a31e3ade946af..529a07b147e42b86d8b64abf7b8717e65db14b45 100644 (file)
@@ -47,9 +47,9 @@ import org.collectionspace.services.common.document.DocumentFilter;
 import org.collectionspace.services.common.document.DocumentHandler;
 import org.collectionspace.services.contact.ContactResource;
 import org.collectionspace.services.contact.ContactsCommon;
-import org.collectionspace.services.contact.ContactsCommonList;
 import org.collectionspace.services.contact.ContactJAXBSchema;
 import org.collectionspace.services.contact.nuxeo.ContactDocumentModelHandler;
+import org.collectionspace.services.jaxb.AbstractCommonList;
 import org.jboss.resteasy.util.HttpResponseCodes;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -60,32 +60,31 @@ import org.slf4j.LoggerFactory;
 @Consumes("application/xml")
 @Produces("application/xml")
 public abstract class AuthorityResourceWithContacts<AuthCommon, AuthItemHandler> extends //FIXME: REM - Why is this resource in this package instead of somewhere in 'common'?
-     AuthorityResource<AuthCommon, AuthItemHandler> {
+        AuthorityResource<AuthCommon, AuthItemHandler> {
 
     private ContactResource contactResource = new ContactResource(); // Warning: ContactResource is a singleton.
-
     final Logger logger = LoggerFactory.getLogger(AuthorityResourceWithContacts.class);
 
-       public AuthorityResourceWithContacts(
-                       Class<AuthCommon> authCommonClass, Class<?> resourceClass,
-                       String authorityCommonSchemaName, String authorityItemCommonSchemaName) {
-               super(authCommonClass, resourceClass,
-                       authorityCommonSchemaName, authorityItemCommonSchemaName);
-       }
+    public AuthorityResourceWithContacts(
+            Class<AuthCommon> authCommonClass, Class<?> resourceClass,
+            String authorityCommonSchemaName, String authorityItemCommonSchemaName) {
+        super(authCommonClass, resourceClass,
+                authorityCommonSchemaName, authorityItemCommonSchemaName);
+    }
 
-       public abstract String getItemServiceName();
+    public abstract String getItemServiceName();
 
     public String getContactServiceName() {
         return contactResource.getServiceName();
     }
 
     private DocumentHandler createContactDocumentHandler(
-               ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx, String inAuthority,
+            ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx, String inAuthority,
             String inItem) throws Exception {
-       ContactDocumentModelHandler docHandler = (ContactDocumentModelHandler)createDocumentHandler(
-                       ctx,
-                       ctx.getCommonPartLabel(getContactServiceName()),
-                       ContactsCommon.class);          
+        ContactDocumentModelHandler docHandler = (ContactDocumentModelHandler) createDocumentHandler(
+                ctx,
+                ctx.getCommonPartLabel(getContactServiceName()),
+                ContactsCommon.class);
         docHandler.setInAuthority(inAuthority);
         docHandler.setInItem(inItem);
         return docHandler;
@@ -93,8 +92,8 @@ public abstract class AuthorityResourceWithContacts<AuthCommon, AuthItemHandler>
 
     /*************************************************************************
      * Contact parts - this is a sub-resource of the AuthorityItem
-        * @param parentspecifier either a CSID or one of the urn forms
-        * @param itemspecifier either a CSID or one of the urn forms
+     * @param parentspecifier either a CSID or one of the urn forms
+     * @param itemspecifier either a CSID or one of the urn forms
      * @return contact
      *************************************************************************/
     @POST
@@ -104,7 +103,7 @@ public abstract class AuthorityResourceWithContacts<AuthCommon, AuthItemHandler>
             @PathParam("itemcsid") String itemspecifier,
             String xmlPayload) {
         try {
-               PoxPayloadIn input = new PoxPayloadIn(xmlPayload);
+            PoxPayloadIn input = new PoxPayloadIn(xmlPayload);
             String parentcsid = lookupParentCSID(parentspecifier, "createContact(authority)", "CREATE_ITEM_CONTACT", null);
 
             ServiceContext itemCtx = createServiceContext(getItemServiceName());
@@ -112,7 +111,7 @@ public abstract class AuthorityResourceWithContacts<AuthCommon, AuthItemHandler>
 
             // Note that we have to create the service context and document
             // handler for the Contact service, not the main service.
-               ServiceContext ctx = createServiceContext(getContactServiceName(), input);
+            ServiceContext ctx = createServiceContext(getContactServiceName(), input);
             DocumentHandler handler = createContactDocumentHandler(ctx, parentcsid, itemcsid);
             String csid = getRepositoryClient(ctx).create(ctx, handler);
             UriBuilder path = UriBuilder.fromResource(resourceClass);
@@ -121,17 +120,17 @@ public abstract class AuthorityResourceWithContacts<AuthCommon, AuthItemHandler>
             return response;
         } catch (Exception e) {
             throw bigReThrow(e,
-                                        "Create Contact failed; one of the requested specifiers for authority:"
-                                                      +parentspecifier+": and item:"+itemspecifier+": was not found.",
-                                        itemspecifier);
+                    "Create Contact failed; one of the requested specifiers for authority:"
+                    + parentspecifier + ": and item:" + itemspecifier + ": was not found.",
+                    itemspecifier);
         }
     }
 
     /**
      * Gets the contact list.
      * 
-        * @param parentspecifier either a CSID or one of the urn forms
-        * @param itemspecifier either a CSID or one of the urn forms
+     * @param parentspecifier either a CSID or one of the urn forms
+     * @param itemspecifier either a CSID or one of the urn forms
      * @param ui the ui
      * 
      * @return the contact list
@@ -139,11 +138,11 @@ public abstract class AuthorityResourceWithContacts<AuthCommon, AuthItemHandler>
     @GET
     @Produces({"application/xml"})
     @Path("{parentcsid}/items/{itemcsid}/contacts/")
-    public ContactsCommonList getContactList(
+    public AbstractCommonList getContactList(
             @PathParam("parentcsid") String parentspecifier,
             @PathParam("itemcsid") String itemspecifier,
             @Context UriInfo ui) {
-        ContactsCommonList contactObjectList = new ContactsCommonList();
+        AbstractCommonList contactObjectList = new AbstractCommonList();
         try {
             String parentcsid = lookupParentCSID(parentspecifier, "getContactList(parent)", "GET_CONTACT_LIST", null);
 
@@ -151,24 +150,24 @@ public abstract class AuthorityResourceWithContacts<AuthCommon, AuthItemHandler>
             String itemcsid = lookupItemCSID(itemspecifier, parentcsid, "getContactList(item)", "GET_CONTACT_LIST", itemCtx);
 
             MultivaluedMap<String, String> queryParams = ui.getQueryParameters();
-               ServiceContext ctx = createServiceContext(getContactServiceName(), queryParams);
+            ServiceContext ctx = createServiceContext(getContactServiceName(), queryParams);
             DocumentHandler handler = createContactDocumentHandler(ctx, parentcsid, itemcsid);
             DocumentFilter myFilter = handler.getDocumentFilter(); //new DocumentFilter();
-            myFilter.appendWhereClause(ContactJAXBSchema.CONTACTS_COMMON + ":" +
-                ContactJAXBSchema.IN_AUTHORITY +
-                "='" + parentcsid + "'" +
-                IQueryManager.SEARCH_QUALIFIER_AND +
-                ContactJAXBSchema.CONTACTS_COMMON + ":" +
-                ContactJAXBSchema.IN_ITEM +
-                "='" + itemcsid + "'",
-                IQueryManager.SEARCH_QUALIFIER_AND);  // "AND" this clause to any existing
+            myFilter.appendWhereClause(ContactJAXBSchema.CONTACTS_COMMON + ":"
+                    + ContactJAXBSchema.IN_AUTHORITY
+                    + "='" + parentcsid + "'"
+                    + IQueryManager.SEARCH_QUALIFIER_AND
+                    + ContactJAXBSchema.CONTACTS_COMMON + ":"
+                    + ContactJAXBSchema.IN_ITEM
+                    + "='" + itemcsid + "'",
+                    IQueryManager.SEARCH_QUALIFIER_AND);  // "AND" this clause to any existing
             getRepositoryClient(ctx).getFiltered(ctx, handler);
-            contactObjectList = (ContactsCommonList) handler.getCommonPartList();
+            contactObjectList = (AbstractCommonList) handler.getCommonPartList();
         } catch (Exception e) {
             throw bigReThrow(e,
-                                        "Get ContactList failed; one of the requested specifiers for authority:"
-                                                   +parentspecifier+": and item:"+itemspecifier+": was not found.",
-                                        itemspecifier);
+                    "Get ContactList failed; one of the requested specifiers for authority:"
+                    + parentspecifier + ": and item:" + itemspecifier + ": was not found.",
+                    itemspecifier);
         }
         return contactObjectList;
     }
@@ -176,8 +175,8 @@ public abstract class AuthorityResourceWithContacts<AuthCommon, AuthItemHandler>
     /**
      * Gets the contact.
      * 
-        * @param parentspecifier either a CSID or one of the urn forms
-        * @param itemspecifier either a CSID or one of the urn forms
+     * @param parentspecifier either a CSID or one of the urn forms
+     * @param itemspecifier either a CSID or one of the urn forms
      * @param csid the csid
      * 
      * @return the contact
@@ -188,7 +187,7 @@ public abstract class AuthorityResourceWithContacts<AuthCommon, AuthItemHandler>
             @PathParam("parentcsid") String parentspecifier,
             @PathParam("itemcsid") String itemspecifier,
             @PathParam("csid") String csid) {
-       PoxPayloadOut result = null;
+        PoxPayloadOut result = null;
         try {
             String parentcsid = lookupParentCSID(parentspecifier, "getContact(parent)", "GET_ITEM_CONTACT", null);
 
@@ -196,20 +195,18 @@ public abstract class AuthorityResourceWithContacts<AuthCommon, AuthItemHandler>
             String itemcsid = lookupItemCSID(itemspecifier, parentcsid, "getContact(item)", "GET_ITEM_CONTACT", itemCtx);
 
             // Note that we have to create the service context and document handler for the Contact service, not the main service.
-               ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx = createServiceContext(getContactServiceName());
+            ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx = createServiceContext(getContactServiceName());
             DocumentHandler handler = createContactDocumentHandler(ctx, parentcsid, itemcsid);
             getRepositoryClient(ctx).get(ctx, csid, handler);
             result = ctx.getOutput();
         } catch (Exception e) {
-            throw bigReThrow(e, "Get failed, the requested Contact CSID:" + csid +
-                                            ": or one of the specifiers for authority:"+parentspecifier+
-                                            ": and item:"+itemspecifier+": was not found.",
-                                        csid);
+            throw bigReThrow(e, "Get failed, the requested Contact CSID:" + csid
+                    + ": or one of the specifiers for authority:" + parentspecifier
+                    + ": and item:" + itemspecifier + ": was not found.",
+                    csid);
         }
         if (result == null) {
-            Response response = Response.status(Response.Status.NOT_FOUND)
-                .entity("Get failed, the requested Contact CSID:" + csid + ": was not found.")
-                .type("text/plain").build();
+            Response response = Response.status(Response.Status.NOT_FOUND).entity("Get failed, the requested Contact CSID:" + csid + ": was not found.").type("text/plain").build();
             throw new WebApplicationException(response);
         }
         return result.toXML();
@@ -218,8 +215,8 @@ public abstract class AuthorityResourceWithContacts<AuthCommon, AuthItemHandler>
     /**
      * Update contact.
      * 
-        * @param parentspecifier either a CSID or one of the urn forms
-        * @param itemspecifier either a CSID or one of the urn forms
+     * @param parentspecifier either a CSID or one of the urn forms
+     * @param itemspecifier either a CSID or one of the urn forms
      * @param csid the csid
      *
      * @return the multipart output
@@ -231,25 +228,25 @@ public abstract class AuthorityResourceWithContacts<AuthCommon, AuthItemHandler>
             @PathParam("itemcsid") String itemspecifier,
             @PathParam("csid") String csid,
             String xmlPayload) {
-       PoxPayloadOut result = null;
+        PoxPayloadOut result = null;
         try {
-               PoxPayloadIn theUpdate = new PoxPayloadIn(xmlPayload);
-                       String parentcsid = lookupParentCSID(parentspecifier, "updateContact(authority)", "UPDATE_CONTACT", null);
+            PoxPayloadIn theUpdate = new PoxPayloadIn(xmlPayload);
+            String parentcsid = lookupParentCSID(parentspecifier, "updateContact(authority)", "UPDATE_CONTACT", null);
 
             ServiceContext itemCtx = createServiceContext(getItemServiceName());
             String itemcsid = lookupItemCSID(itemspecifier, parentcsid, "updateContact(item)", "UPDATE_CONTACT", itemCtx);
 
             ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx = null;
             // Note that we have to create the service context and document handler for the Contact service, not the main service.
-               ctx = createServiceContext(getContactServiceName(), theUpdate);
+            ctx = createServiceContext(getContactServiceName(), theUpdate);
             DocumentHandler handler = createContactDocumentHandler(ctx, parentcsid, itemcsid);
             getRepositoryClient(ctx).update(ctx, csid, handler);
             result = ctx.getOutput();
         } catch (Exception e) {
-           throw bigReThrow(e, "Update failed, the requested Contact CSID:" + csid +
-                               ": or one of the specifiers for authority:"+parentspecifier+
-                               ": and item:"+itemspecifier+": was not found.",
-                            csid);
+            throw bigReThrow(e, "Update failed, the requested Contact CSID:" + csid
+                    + ": or one of the specifiers for authority:" + parentspecifier
+                    + ": and item:" + itemspecifier + ": was not found.",
+                    csid);
         }
         return result.toXML();
     }
@@ -257,8 +254,8 @@ public abstract class AuthorityResourceWithContacts<AuthCommon, AuthItemHandler>
     /**
      * Delete contact.
      * 
-        * @param parentspecifier either a CSID or one of the urn forms
-        * @param itemspecifier either a CSID or one of the urn forms
+     * @param parentspecifier either a CSID or one of the urn forms
+     * @param itemspecifier either a CSID or one of the urn forms
      * @param csid the csid
      * 
      * @return the response
@@ -270,7 +267,7 @@ public abstract class AuthorityResourceWithContacts<AuthCommon, AuthItemHandler>
             @PathParam("itemcsid") String itemspecifier,
             @PathParam("csid") String csid) {
         try {
-                       String parentcsid = lookupParentCSID(parentspecifier, "deleteContact(authority)", "DELETE_CONTACT", null);
+            String parentcsid = lookupParentCSID(parentspecifier, "deleteContact(authority)", "DELETE_CONTACT", null);
 
             ServiceContext itemCtx = createServiceContext(getItemServiceName());
             String itemcsid = lookupItemCSID(itemspecifier, parentcsid, "deleteContact(item)", "DELETE_CONTACT", itemCtx);
@@ -278,14 +275,13 @@ public abstract class AuthorityResourceWithContacts<AuthCommon, AuthItemHandler>
 
             ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx = null;
             // Note that we have to create the service context for the Contact service, not the main service.
-               ctx = createServiceContext(getContactServiceName());
+            ctx = createServiceContext(getContactServiceName());
             getRepositoryClient(ctx).delete(ctx, csid);
             return Response.status(HttpResponseCodes.SC_OK).build();
-         } catch (Exception e) {
-            throw bigReThrow(e, "DELETE failed, the requested Contact CSID:" + csid +
-                               ": or one of the specifiers for authority:"+parentspecifier+
-                               ": and item:"+itemspecifier+": was not found.", csid);
+        } catch (Exception e) {
+            throw bigReThrow(e, "DELETE failed, the requested Contact CSID:" + csid
+                    + ": or one of the specifiers for authority:" + parentspecifier
+                    + ": and item:" + itemspecifier + ": was not found.", csid);
         }
     }
-    
 }
index c4c5dc406320ec7d3fe364f8e4314e76db47cffa..b1d4cc9ec98caf938fcc43211661fffad1daf20a 100644 (file)
  */
 package org.collectionspace.services.contact.nuxeo;
 
-import java.util.Iterator;
-import java.util.List;
 import java.util.Map;
 
 import org.collectionspace.services.contact.ContactJAXBSchema;
-import org.collectionspace.services.common.document.DocumentHandler.Action;
 import org.collectionspace.services.common.document.DocumentWrapper;
+import org.collectionspace.services.nuxeo.client.java.DocHandlerBase;
 import org.collectionspace.services.common.service.ObjectPartType;
-import org.collectionspace.services.common.vocabulary.AuthorityItemJAXBSchema;
 import org.collectionspace.services.contact.ContactsCommon;
-import org.collectionspace.services.contact.ContactsCommonList;
-import org.collectionspace.services.contact.ContactsCommonList.ContactListItem;
 
-import org.collectionspace.services.jaxb.AbstractCommonList;
-import org.collectionspace.services.nuxeo.client.java.RemoteDocumentModelHandlerImpl;
-import org.collectionspace.services.nuxeo.util.NuxeoUtils;
 import org.nuxeo.ecm.core.api.DocumentModel;
-import org.nuxeo.ecm.core.api.DocumentModelList;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -48,21 +39,14 @@ import org.slf4j.LoggerFactory;
  * The Class ContactDocumentModelHandler.
  */
 public class ContactDocumentModelHandler
-        extends RemoteDocumentModelHandlerImpl<ContactsCommon, ContactsCommonList> {
+        extends DocHandlerBase<ContactsCommon> {
 
-    /** The logger. */
     private final Logger logger = LoggerFactory.getLogger(ContactDocumentModelHandler.class);
-    
-    /** The contact. */
-    private ContactsCommon contact;
-    
-    /** The contact list. */
-    private ContactsCommonList contactList;
-
-    /** The in authority. */
+    private static final String COMMON_PART_LABEL = "contacts_common";
     private String inAuthority;
-
-    /**
+    private String inItem;
+    
+     /**
      * Gets the in authority.
      *
      * @return the in authority
@@ -74,15 +58,12 @@ public class ContactDocumentModelHandler
     /**
      * Sets the in authority.
      *
-     * @param inAuthority the new in authority
+     * @param inAuthority the new in item
      */
     public void setInAuthority(String inAuthority) {
         this.inAuthority = inAuthority;
     }
 
-    /** The in item. */
-    private String inItem;
-
     /**
      * Gets the in item.
      *
@@ -106,11 +87,12 @@ public class ContactDocumentModelHandler
      */
     @Override
     public void handleCreate(DocumentWrapper<DocumentModel> wrapDoc) throws Exception {
-       // first fill all the parts of the document
-       super.handleCreate(wrapDoc);            
-       handleInAuthority(wrapDoc.getWrappedObject());
+        // first fill all the parts of the document
+        super.handleCreate(wrapDoc);
+        handleInAuthority(wrapDoc.getWrappedObject());
+        // handleDisplayNames(wrapDoc.getWrappedObject());
     }
-    
+
     /**
      * Check the logic around the parent pointer. Note that we only need do this on
      * create, since we have logic to make this read-only on update. 
@@ -120,110 +102,89 @@ public class ContactDocumentModelHandler
      * @throws Exception the exception
      */
     private void handleInAuthority(DocumentModel docModel) throws Exception {
-       String commonPartLabel = getServiceContext().getCommonPartLabel("contacts");
-       docModel.setProperty(commonPartLabel, 
-                       ContactJAXBSchema.IN_AUTHORITY, inAuthority);
-       docModel.setProperty(commonPartLabel, 
-                       ContactJAXBSchema.IN_ITEM, inItem);
+        String commonPartLabel = getServiceContext().getCommonPartLabel("contacts");
+        docModel.setProperty(commonPartLabel,
+                ContactJAXBSchema.IN_AUTHORITY, inAuthority);
+        docModel.setProperty(commonPartLabel,
+                ContactJAXBSchema.IN_ITEM, inItem);
     }
 
-    /* (non-Javadoc)
-     * @see org.collectionspace.services.nuxeo.client.java.DocumentModelHandler#getCommonPart()
-     */
-    @Override
-    public ContactsCommon getCommonPart() {
-        return contact;
+    private void handleDisplayNames(DocumentModel docModel) throws Exception {
+        String commonPartLabel = getServiceContext().getCommonPartLabel("contacts");
+        String email = getStringValueInPrimaryRepeatingComplexProperty(
+                docModel, commonPartLabel, ContactJAXBSchema.EMAIL_GROUP_LIST,
+                ContactJAXBSchema.EMAIL);
+        String telephoneNumber = getStringValueInPrimaryRepeatingComplexProperty(
+                docModel, commonPartLabel, ContactJAXBSchema.TELEPHONE_NUMBER_GROUP_LIST,
+                ContactJAXBSchema.TELEPHONE_NUMBER);
+        String addressPlace1 = getStringValueInPrimaryRepeatingComplexProperty(
+                docModel, commonPartLabel, ContactJAXBSchema.ADDRESS_GROUP_LIST,
+                ContactJAXBSchema.ADDRESS_PLACE_1);
+        String displayName = prepareDefaultDisplayName(email, telephoneNumber, addressPlace1);
+        docModel.setProperty(commonPartLabel, ContactJAXBSchema.DISPLAY_NAME,
+                    displayName);
     }
 
-    /* (non-Javadoc)
-     * @see org.collectionspace.services.nuxeo.client.java.DocumentModelHandler#setCommonPart(java.lang.Object)
-     */
-    @Override
-    public void setCommonPart(ContactsCommon contact) {
-        this.contact = contact;
-    }
-
-    /* (non-Javadoc)
-     * @see org.collectionspace.services.nuxeo.client.java.DocumentModelHandler#getCommonPartList()
-     */
-    @Override
-    public ContactsCommonList getCommonPartList() {
-        return contactList;
-    }
-
-    /* (non-Javadoc)
-     * @see org.collectionspace.services.nuxeo.client.java.DocumentModelHandler#setCommonPartList(java.lang.Object)
-     */
-    @Override
-    public void setCommonPartList(ContactsCommonList contactList) {
-        this.contactList = contactList;
-    }
-
-    /* (non-Javadoc)
-     * @see org.collectionspace.services.nuxeo.client.java.DocumentModelHandler#extractCommonPart(org.collectionspace.services.common.document.DocumentWrapper)
-     */
-    @Override
-    public ContactsCommon extractCommonPart(DocumentWrapper<DocumentModel> wrapDoc)
-            throws Exception {
-        throw new UnsupportedOperationException();
-    }
-
-    /* (non-Javadoc)
-     * @see org.collectionspace.services.nuxeo.client.java.DocumentModelHandler#fillCommonPart(java.lang.Object, org.collectionspace.services.common.document.DocumentWrapper)
-     */
-    @Override
-    public void fillCommonPart(ContactsCommon contactObject, DocumentWrapper<DocumentModel> wrapDoc) throws Exception {
-        throw new UnsupportedOperationException();
-    }
-
-    /* (non-Javadoc)
-     * @see org.collectionspace.services.nuxeo.client.java.DocumentModelHandler#extractCommonPartList(org.collectionspace.services.common.document.DocumentWrapper)
+    /**
+     * Produces a default displayName from the basic name and foundingPlace fields.
+     * @see OrgAuthorityClientUtils.prepareDefaultDisplayName() which
+     * duplicates this logic, until we define a service-general utils package
+     * that is neither client nor service specific.
+     * @param shortName
+     * @param foundingPlace
+     * @return
+     * @throws Exception
      */
-    @Override
-    public ContactsCommonList extractCommonPartList(DocumentWrapper<DocumentModelList> wrapDoc) throws Exception {
-        ContactsCommonList coList = extractPagingInfo(new ContactsCommonList(), wrapDoc);
-        AbstractCommonList commonList = (AbstractCommonList) coList;
-        commonList.setFieldsReturned("addressPlace|uri|csid");
-        List<ContactsCommonList.ContactListItem> list = coList.getContactListItem();
-        Iterator<DocumentModel> iter = wrapDoc.getWrappedObject().iterator();
-        while(iter.hasNext()){
-            DocumentModel docModel = iter.next();
-            ContactListItem clistItem = new ContactListItem();
-            // TODO Revisit which information unit(s) should be returned
-            // in each entry, in a list of contact information.
-            // See CSPACE-1018
-            clistItem.setAddressPlace((String) docModel.getProperty(getServiceContext().getCommonPartLabel(),
-                    ContactJAXBSchema.ADDRESS_PLACE));
-            String id = getCsid(docModel);//NuxeoUtils.extractId(docModel.getPathAsString());
-            clistItem.setUri(getServiceContextPath() + id);
-            clistItem.setCsid(id);
-            list.add(clistItem);
+    private static String prepareDefaultDisplayName(String email,
+            String telephoneNumber, String addressPlace1) throws Exception {
+        
+        final int MAX_DISPLAY_NAME_LENGTH = 30;
+        
+        StringBuilder newStr = new StringBuilder("");
+        final String sep = " ";
+        boolean firstAdded = false;
+        
+        if (! email.isEmpty()) {
+            newStr.append(email);
+            firstAdded = true;
+        }
+        
+        if (! telephoneNumber.isEmpty() && newStr.length() <= MAX_DISPLAY_NAME_LENGTH) {
+            if (firstAdded) {
+                newStr.append(sep);
+            } else {
+                firstAdded = true;
+            }
+            newStr.append(telephoneNumber);
+        }
+        
+        if (! addressPlace1.isEmpty() && newStr.length() <= MAX_DISPLAY_NAME_LENGTH) {
+            if (firstAdded) {
+                newStr.append(sep);
+            }
+            newStr.append(addressPlace1);
+        }
+                
+        if (newStr.length() > MAX_DISPLAY_NAME_LENGTH) {
+           return newStr.toString().substring(0, MAX_DISPLAY_NAME_LENGTH) + "...";
+        } else {
+           return newStr.toString();
         }
-
-        return coList;
     }
 
-    /* (non-Javadoc)
-     * @see org.collectionspace.services.common.document.AbstractMultipartDocumentHandlerImpl#getQProperty(java.lang.String)
-     */
-    @Override
-    public String getQProperty(String prop) {
-        return ContactConstants.NUXEO_SCHEMA_NAME + ":" + prop;
-    }
-    
     /**
      * Filters out ContactJAXBSchema.IN_AUTHORITY, and IN_ITEM, to ensure that
      * the parent links remains untouched.
+     * Also remove the display name, as this is always computed.
      * @param objectProps the properties parsed from the update payload
      * @param partMeta metadata for the object to fill
      */
     @Override
     public void filterReadOnlyPropertiesForPart(
-               Map<String, Object> objectProps, ObjectPartType partMeta) {
-       super.filterReadOnlyPropertiesForPart(objectProps, partMeta);
-       objectProps.remove(ContactJAXBSchema.IN_AUTHORITY);
-       objectProps.remove(ContactJAXBSchema.IN_ITEM);
+            Map<String, Object> objectProps, ObjectPartType partMeta) {
+        super.filterReadOnlyPropertiesForPart(objectProps, partMeta);
+        objectProps.remove(ContactJAXBSchema.IN_AUTHORITY);
+        objectProps.remove(ContactJAXBSchema.IN_ITEM);
+        objectProps.remove(ContactJAXBSchema.DISPLAY_NAME);
     }
-
 }
-
index 5083f02eb56509dda71b3dfb23890f216fc34b0b..c2e8b68b2d5405514ce0d5c522181015b206d7dd 100644 (file)
@@ -30,14 +30,10 @@ import java.util.Map;
 import org.collectionspace.services.LocationJAXBSchema;
 import org.collectionspace.services.client.AuthorityClient;
 import org.collectionspace.services.client.CollectionSpaceClient;
-import org.collectionspace.services.client.ContactClient;
-import org.collectionspace.services.client.ContactClientUtils;
 import org.collectionspace.services.client.PayloadOutputPart;
 import org.collectionspace.services.client.PoxPayloadIn;
 import org.collectionspace.services.client.PoxPayloadOut;
 import org.collectionspace.services.common.AbstractCommonListUtils;
-import org.collectionspace.services.contact.ContactsCommon;
-import org.collectionspace.services.contact.ContactsCommonList;
 import org.collectionspace.services.client.LocationAuthorityClient;
 import org.collectionspace.services.client.LocationAuthorityClientUtils;
 import org.collectionspace.services.jaxb.AbstractCommonList;
index dcb5a133681e44d9265a1d786e79a1baaf070511..8529b975f55fb4916889c9402d43d4283b71d36b 100644 (file)
@@ -38,8 +38,9 @@ import org.collectionspace.services.client.PayloadOutputPart;
 import org.collectionspace.services.client.PoxPayloadIn;
 import org.collectionspace.services.client.PoxPayloadOut;
 import org.collectionspace.services.common.AbstractCommonListUtils;
+import org.collectionspace.services.contact.AddressGroup;
+import org.collectionspace.services.contact.AddressGroupList;
 import org.collectionspace.services.contact.ContactsCommon;
-import org.collectionspace.services.contact.ContactsCommonList;
 import org.collectionspace.services.client.OrgAuthorityClient;
 import org.collectionspace.services.client.OrgAuthorityClientUtils;
 import org.collectionspace.services.jaxb.AbstractCommonList;
@@ -71,53 +72,46 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
     private final String REFNAME = "refName";
     private final String DISPLAYNAME = "displayName";
 
-       @Override
-       public String getServicePathComponent() {
-               return OrgAuthorityClient.SERVICE_PATH_COMPONENT;
-       }
+    @Override
+    public String getServicePathComponent() {
+        return OrgAuthorityClient.SERVICE_PATH_COMPONENT;
+    }
 
-       @Override
-       protected String getServiceName() {
-               return OrgAuthorityClient.SERVICE_NAME;
-       }    
-    
+    @Override
+    protected String getServiceName() {
+        return OrgAuthorityClient.SERVICE_NAME;
+    }
     /** The test organization shortname. */
     private final String TEST_ORG_SHORTNAME = "Test Org";
-    
     /** The test organization founding place. */
     private final String TEST_ORG_FOUNDING_PLACE = "Anytown, USA";
-    
     // Hold some values for a recently created item to verify upon read.
     private String knownResourceId = null;
     private String knownResourceShortIdentifer = null;
     private String knownResourceRefName = null;
     private String knownItemResourceId = null;
     private String knownItemResourceShortIdentifer = null;
-    
     /** The known contact resource id. */
     private String knownContactResourceId = null;
-    
     /** The n items to create in list. */
     private int nItemsToCreateInList = 3;
-    
     /** The all item resource ids created. */
     private Map<String, String> allItemResourceIdsCreated =
-        new HashMap<String, String>();
-    
+            new HashMap<String, String>();
     /** The all contact resource ids created. */
     private Map<String, String> allContactResourceIdsCreated =
-        new HashMap<String, String>();
-    
-    protected void setKnownResource( String id, String shortIdentifer,
-               String refName ) {
-       knownResourceId = id;
-       knownResourceShortIdentifer = shortIdentifer;
-       knownResourceRefName = refName;
+            new HashMap<String, String>();
+
+    protected void setKnownResource(String id, String shortIdentifer,
+            String refName) {
+        knownResourceId = id;
+        knownResourceShortIdentifer = shortIdentifer;
+        knownResourceRefName = refName;
     }
 
-    protected void setKnownItemResource( String id, String shortIdentifer ) {
-       knownItemResourceId = id;
-       knownItemResourceShortIdentifer = shortIdentifer;
+    protected void setKnownItemResource(String id, String shortIdentifer) {
+        knownItemResourceId = id;
+        knownItemResourceShortIdentifer = shortIdentifer;
     }
 
     /* (non-Javadoc)
@@ -125,9 +119,9 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
      */
     @Override
     protected CollectionSpaceClient getClientInstance() {
-       return new OrgAuthorityClient();
+        return new OrgAuthorityClient();
     }
-    
+
     // ---------------------------------------------------------------
     // CRUD tests : CREATE tests
     // ---------------------------------------------------------------
@@ -136,8 +130,8 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
      * @see org.collectionspace.services.client.test.ServiceTest#create(java.lang.String)
      */
     @Override
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"create"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"create"})
     public void create(String testName) throws Exception {
 
         if (logger.isDebugEnabled()) {
@@ -152,37 +146,37 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
         OrgAuthorityClient client = new OrgAuthorityClient();
         String shortId = createIdentifier();
         String displayName = "displayName-" + shortId;
-       String baseRefName = OrgAuthorityClientUtils.createOrgAuthRefName(shortId, null);
-       PoxPayloadOut multipart = OrgAuthorityClientUtils.createOrgAuthorityInstance(
-                       displayName, shortId, client.getCommonPartName());
-        
-       String newID = null;
-       ClientResponse<Response> res = client.create(multipart);
+        String baseRefName = OrgAuthorityClientUtils.createOrgAuthRefName(shortId, null);
+        PoxPayloadOut multipart = OrgAuthorityClientUtils.createOrgAuthorityInstance(
+                displayName, shortId, client.getCommonPartName());
+
+        String newID = null;
+        ClientResponse<Response> res = client.create(multipart);
         try {
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match
-               // the expected response(s)?
-               //
-               // Specifically:
-               // Does it fall within the set of valid status codes?
-               // Does it exactly match the expected status code?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-       
-               newID = OrgAuthorityClientUtils.extractId(res);
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match
+            // the expected response(s)?
+            //
+            // Specifically:
+            // Does it fall within the set of valid status codes?
+            // Does it exactly match the expected status code?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+
+            newID = OrgAuthorityClientUtils.extractId(res);
         } finally {
-               res.releaseConnection();
+            res.releaseConnection();
         }
-        
+
         // Store the ID returned from the first resource created
         // for additional tests below.
-        if (knownResourceId == null){
-               setKnownResource( newID, shortId, baseRefName ); 
+        if (knownResourceId == null) {
+            setKnownResource(newID, shortId, baseRefName);
             if (logger.isDebugEnabled()) {
                 logger.debug(testName + ": knownResourceId=" + knownResourceId);
             }
@@ -194,34 +188,34 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
 
     @Override
     protected PoxPayloadOut createInstance(String identifier) {
-       OrgAuthorityClient client = new OrgAuthorityClient();
+        OrgAuthorityClient client = new OrgAuthorityClient();
         String displayName = "displayName-" + identifier;
         PoxPayloadOut multipart = OrgAuthorityClientUtils.createOrgAuthorityInstance(
                 displayName, identifier, client.getCommonPartName());
         return multipart;
     }
-    
+
     @Override
-    protected PoxPayloadOut createItemInstance(String parentCsid, String identifier) {         
-       String headerLabel = new OrgAuthorityClient().getItemCommonPartName();
+    protected PoxPayloadOut createItemInstance(String parentCsid, String identifier) {
+        String headerLabel = new OrgAuthorityClient().getItemCommonPartName();
         String shortId = "testOrg";
-        Map<String, String> testOrgMap = new HashMap<String,String>();
+        Map<String, String> testOrgMap = new HashMap<String, String>();
         testOrgMap.put(OrganizationJAXBSchema.SHORT_IDENTIFIER, shortId);
         testOrgMap.put(OrganizationJAXBSchema.SHORT_NAME, TEST_ORG_SHORTNAME);
         testOrgMap.put(OrganizationJAXBSchema.LONG_NAME, "The real official test organization");
         testOrgMap.put(OrganizationJAXBSchema.FOUNDING_DATE, "May 26, 1907");
         testOrgMap.put(OrganizationJAXBSchema.FOUNDING_PLACE, TEST_ORG_FOUNDING_PLACE);
 
-       return OrgAuthorityClientUtils.createOrganizationInstance(identifier, testOrgMap, headerLabel);
+        return OrgAuthorityClientUtils.createOrganizationInstance(identifier, testOrgMap, headerLabel);
     }
-    
+
     /**
      * Creates the item.
      *
      * @param testName the test name
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"create"}, dependsOnMethods = {"create"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"create"}, dependsOnMethods = {"create"})
     public void createItem(String testName) {
         setupCreate();
         String newID = createItemInAuthority(knownResourceId, knownResourceRefName);
@@ -237,26 +231,26 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
     private String createItemInAuthority(String vcsid, String authRefName) {
 
         final String testName = "createItemInAuthority";
-        if(logger.isDebugEnabled()){
+        if (logger.isDebugEnabled()) {
             logger.debug(testName + ":...");
         }
 
         // Submit the request to the service and store the response.
         OrgAuthorityClient client = new OrgAuthorityClient();
         String shortId = "testOrg";
-        Map<String, String> testOrgMap = new HashMap<String,String>();
+        Map<String, String> testOrgMap = new HashMap<String, String>();
         testOrgMap.put(OrganizationJAXBSchema.SHORT_IDENTIFIER, shortId);
         testOrgMap.put(OrganizationJAXBSchema.SHORT_NAME, TEST_ORG_SHORTNAME);
         testOrgMap.put(OrganizationJAXBSchema.LONG_NAME, "The real official test organization");
         testOrgMap.put(OrganizationJAXBSchema.FOUNDING_DATE, "May 26, 1907");
         testOrgMap.put(OrganizationJAXBSchema.FOUNDING_PLACE, TEST_ORG_FOUNDING_PLACE);
-        
-        Map<String, List<String>> testOrgRepeatablesMap = new HashMap<String,List<String>>();
+
+        Map<String, List<String>> testOrgRepeatablesMap = new HashMap<String, List<String>>();
         List<String> testOrgContactNames = new ArrayList<String>();
         testOrgContactNames.add("joe@example.org");
         testOrgContactNames.add("sally@example.org");
         testOrgRepeatablesMap.put(OrganizationJAXBSchema.CONTACT_NAMES, testOrgContactNames);
-        
+
         MainBodyGroupList mainBodyList = new MainBodyGroupList();
         List<MainBodyGroup> mainBodyGroups = mainBodyList.getMainBodyGroup();
         MainBodyGroup mainBodyGroup = new MainBodyGroup();
@@ -265,12 +259,12 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
         mainBodyGroups.add(mainBodyGroup);
 
         String newID = OrgAuthorityClientUtils.createItemInAuthority(
-                       vcsid, authRefName, testOrgMap, testOrgRepeatablesMap, mainBodyList, client);
-        
+                vcsid, authRefName, testOrgMap, testOrgRepeatablesMap, mainBodyList, client);
+
         // Store the ID returned from the first item resource created
         // for additional tests below.
-        if (knownItemResourceId == null){
-               setKnownItemResource(newID, shortId);
+        if (knownItemResourceId == null) {
+            setKnownItemResource(newID, shortId);
             if (logger.isDebugEnabled()) {
                 logger.debug(testName + ": knownItemResourceId=" + knownItemResourceId);
             }
@@ -289,21 +283,21 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
      *
      * @param testName the test name
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"create"}, dependsOnMethods = {"createItem"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"create"}, dependsOnMethods = {"createItem"})
     public void createContact(String testName) {
         setupCreate();
         String newID = createContactInItem(knownResourceId, knownItemResourceId);
     }
 
-   /**
-    * Creates the contact in item.
-    *
-    * @param parentcsid the parentcsid
-    * @param itemcsid the itemcsid
-    * @return the string
-    */
-   private String createContactInItem(String parentcsid, String itemcsid) {
+    /**
+     * Creates the contact in item.
+     *
+     * @param parentcsid the parentcsid
+     * @param itemcsid the itemcsid
+     * @return the string
+     */
+    private String createContactInItem(String parentcsid, String itemcsid) {
 
         final String testName = "createContactInItem";
         if (logger.isDebugEnabled()) {
@@ -315,31 +309,31 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
         OrgAuthorityClient client = new OrgAuthorityClient();
         String identifier = createIdentifier();
         PoxPayloadOut multipart =
-            ContactClientUtils.createContactInstance(parentcsid,
-            itemcsid, identifier, new ContactClient().getCommonPartName());
-        
+                ContactClientUtils.createContactInstance(parentcsid,
+                itemcsid, identifier, new ContactClient().getCommonPartName());
+
         String newID = null;
         ClientResponse<Response> res =
-             client.createContact(parentcsid, itemcsid, multipart);
+                client.createContact(parentcsid, itemcsid, multipart);
         try {
-               int statusCode = res.getStatus();
-               // Check the status code of the response: does it match
-               // the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-
-               newID = OrgAuthorityClientUtils.extractId(res);
+            int statusCode = res.getStatus();
+            // Check the status code of the response: does it match
+            // the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+
+            newID = OrgAuthorityClientUtils.extractId(res);
         } finally {
-               res.releaseConnection();
+            res.releaseConnection();
         }
 
         // Store the ID returned from the first contact resource created
         // for additional tests below.
-        if (knownContactResourceId == null){
+        if (knownContactResourceId == null) {
             knownContactResourceId = newID;
             if (logger.isDebugEnabled()) {
                 logger.debug(testName + ": knownContactResourceId=" + knownContactResourceId);
@@ -355,7 +349,6 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
     }
 
     // Failure outcomes
-
     // Placeholders until the three tests below can be uncommented.
     // See Issue CSPACE-401.
     /* (non-Javadoc)
@@ -363,7 +356,7 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
      */
     @Override
     public void createWithEmptyEntityBody(String testName) throws Exception {
-       //Should this really be empty?
+        //Should this really be empty?
     }
 
     /* (non-Javadoc)
@@ -371,7 +364,7 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
      */
     @Override
     public void createWithMalformedXml(String testName) throws Exception {
-       //Should this really be empty?
+        //Should this really be empty?
     }
 
     /* (non-Javadoc)
@@ -379,108 +372,107 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
      */
     @Override
     public void createWithWrongXmlSchema(String testName) throws Exception {
-       //Should this really be empty?
+        //Should this really be empty?
     }
 
-/*
+    /*
     @Override
     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
-        groups = {"create"}, dependsOnMethods = {"create", "testSubmitRequest"})
+    groups = {"create"}, dependsOnMethods = {"create", "testSubmitRequest"})
     public void createWithEmptyEntityBody(String testName) throws Exception {
-
-        if (logger.isDebugEnabled()) {
-            logger.debug(testBanner(testName, CLASS_NAME));
-        }
-        // Perform setup.
-        setupCreateWithEmptyEntityBody();
-
-        // Submit the request to the service and store the response.
-        String method = REQUEST_TYPE.httpMethodName();
-        String url = getServiceRootURL();
-        String mediaType = MediaType.APPLICATION_XML;
-        final String entity = "";
-        int statusCode = submitRequest(method, url, mediaType, entity);
-
-        // Check the status code of the response: does it match
-        // the expected response(s)?
-        if(logger.isDebugEnabled()) {
-            logger.debug(testName + ": url=" + url +
-                " status=" + statusCode);
-         }
-        Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-        invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-        Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-        }
-
+    
+    if (logger.isDebugEnabled()) {
+    logger.debug(testBanner(testName, CLASS_NAME));
+    }
+    // Perform setup.
+    setupCreateWithEmptyEntityBody();
+    
+    // Submit the request to the service and store the response.
+    String method = REQUEST_TYPE.httpMethodName();
+    String url = getServiceRootURL();
+    String mediaType = MediaType.APPLICATION_XML;
+    final String entity = "";
+    int statusCode = submitRequest(method, url, mediaType, entity);
+    
+    // Check the status code of the response: does it match
+    // the expected response(s)?
+    if(logger.isDebugEnabled()) {
+    logger.debug(testName + ": url=" + url +
+    " status=" + statusCode);
+    }
+    Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+    Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+    }
+    
     @Override
     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
-        groups = {"create"}, dependsOnMethods = {"create", "testSubmitRequest"})
+    groups = {"create"}, dependsOnMethods = {"create", "testSubmitRequest"})
     public void createWithMalformedXml(String testName) throws Exception {
-
-        if (logger.isDebugEnabled()) {
-            logger.debug(testBanner(testName, CLASS_NAME));
-        }
-        // Perform setup.
-        setupCreateWithMalformedXml();
-
-        // Submit the request to the service and store the response.
-        String method = REQUEST_TYPE.httpMethodName();
-        String url = getServiceRootURL();
-        String mediaType = MediaType.APPLICATION_XML;
-        final String entity = MALFORMED_XML_DATA; // Constant from base class.
-        int statusCode = submitRequest(method, url, mediaType, entity);
-
-        // Check the status code of the response: does it match
-        // the expected response(s)?
-        if(logger.isDebugEnabled()){
-            logger.debug(testName + ": url=" + url +
-                " status=" + statusCode);
-         }
-        Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-        invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-        Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+    
+    if (logger.isDebugEnabled()) {
+    logger.debug(testBanner(testName, CLASS_NAME));
     }
-
+    // Perform setup.
+    setupCreateWithMalformedXml();
+    
+    // Submit the request to the service and store the response.
+    String method = REQUEST_TYPE.httpMethodName();
+    String url = getServiceRootURL();
+    String mediaType = MediaType.APPLICATION_XML;
+    final String entity = MALFORMED_XML_DATA; // Constant from base class.
+    int statusCode = submitRequest(method, url, mediaType, entity);
+    
+    // Check the status code of the response: does it match
+    // the expected response(s)?
+    if(logger.isDebugEnabled()){
+    logger.debug(testName + ": url=" + url +
+    " status=" + statusCode);
+    }
+    Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+    Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+    }
+    
     @Override
     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
-        groups = {"create"}, dependsOnMethods = {"create", "testSubmitRequest"})
+    groups = {"create"}, dependsOnMethods = {"create", "testSubmitRequest"})
     public void createWithWrongXmlSchema(String testName) throws Exception {
-
-        if (logger.isDebugEnabled()) {
-            logger.debug(testBanner(testName, CLASS_NAME));
-        }
-        // Perform setup.
-        setupCreateWithWrongXmlSchema();
-
-        // Submit the request to the service and store the response.
-        String method = REQUEST_TYPE.httpMethodName();
-        String url = getServiceRootURL();
-        String mediaType = MediaType.APPLICATION_XML;
-        final String entity = WRONG_XML_SCHEMA_DATA;
-        int statusCode = submitRequest(method, url, mediaType, entity);
-
-        // Check the status code of the response: does it match
-        // the expected response(s)?
-        if(logger.isDebugEnabled()){
-            logger.debug(testName + ": url=" + url +
-                " status=" + statusCode);
-         }
-        Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-        invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-        Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+    
+    if (logger.isDebugEnabled()) {
+    logger.debug(testBanner(testName, CLASS_NAME));
     }
-*/
-
+    // Perform setup.
+    setupCreateWithWrongXmlSchema();
+    
+    // Submit the request to the service and store the response.
+    String method = REQUEST_TYPE.httpMethodName();
+    String url = getServiceRootURL();
+    String mediaType = MediaType.APPLICATION_XML;
+    final String entity = WRONG_XML_SCHEMA_DATA;
+    int statusCode = submitRequest(method, url, mediaType, entity);
+    
+    // Check the status code of the response: does it match
+    // the expected response(s)?
+    if(logger.isDebugEnabled()){
+    logger.debug(testName + ": url=" + url +
+    " status=" + statusCode);
+    }
+    Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+    Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+    }
+     */
     // ---------------------------------------------------------------
     // CRUD tests : CREATE LIST tests
     // ---------------------------------------------------------------
     // Success outcomes
     /* (non-Javadoc)
- * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#createList(java.lang.String)
- */
-@Override
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"createList"}, dependsOnGroups = {"create"})
    * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#createList(java.lang.String)
    */
+    @Override
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"createList"}, dependsOnGroups = {"create"})
     public void createList(String testName) throws Exception {
         for (int i = 0; i < nItemsToCreateInList; i++) {
             create(testName);
@@ -493,8 +485,8 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
      * @param testName the test name
      * @throws Exception the exception
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"createList"}, dependsOnMethods = {"createList"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"createList"}, dependsOnMethods = {"createList"})
     public void createItemList(String testName) throws Exception {
         // Add items to the initially-created, known parent record.
         for (int j = 0; j < nItemsToCreateInList; j++) {
@@ -508,8 +500,8 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
      * @param testName the test name
      * @throws Exception the exception
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"createList"}, dependsOnMethods = {"createItemList"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"createList"}, dependsOnMethods = {"createItemList"})
     public void createContactList(String testName) throws Exception {
         // Add contacts to the initially-created, known item record.
         for (int j = 0; j < nItemsToCreateInList; j++) {
@@ -525,10 +517,10 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
      * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#read(java.lang.String)
      */
     @Override
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"read"}, dependsOnGroups = {"create"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"read"}, dependsOnGroups = {"create"})
     public void read(String testName) throws Exception {
-       readInternal(testName, knownResourceId, null);
+        readInternal(testName, knownResourceId, null);
     }
 
     /**
@@ -537,12 +529,12 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
      * @param testName the test name
      * @throws Exception the exception
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-            groups = {"read"}, dependsOnGroups = {"create"})
-        public void readByName(String testName) throws Exception {
-           readInternal(testName, null, knownResourceShortIdentifer);
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"read"}, dependsOnGroups = {"create"})
+    public void readByName(String testName) throws Exception {
+        readInternal(testName, null, knownResourceShortIdentifer);
     }
-    
+
     protected void readInternal(String testName, String CSID, String shortId) {
 
         if (logger.isDebugEnabled()) {
@@ -554,35 +546,38 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
         // Submit the request to the service and store the response.
         OrgAuthorityClient client = new OrgAuthorityClient();
         ClientResponse<String> res = null;
-        if(CSID!=null) {
+        if (CSID != null) {
             res = client.read(CSID);
-        } else if(shortId!=null) {
-               res = client.readByName(shortId);
+        } else if (shortId != null) {
+            res = client.readByName(shortId);
         } else {
-               Assert.fail("readInternal: Internal error. One of CSID or shortId must be non-null");
+            Assert.fail("readInternal: Internal error. One of CSID or shortId must be non-null");
         }
         try {
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match
-               // the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-               //FIXME: remove the following try catch once Aron fixes signatures
-               try {
-                   PoxPayloadIn input = new PoxPayloadIn(res.getEntity());
-                   OrgauthoritiesCommon orgAuthority = (OrgauthoritiesCommon) extractPart(input,
-                           new OrgAuthorityClient().getCommonPartName(), OrgauthoritiesCommon.class);
-                   Assert.assertNotNull(orgAuthority);
-               } catch (Exception e) {
-                   throw new RuntimeException(e);
-               }
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match
+            // the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+            //FIXME: remove the following try catch once Aron fixes signatures
+            try {
+                PoxPayloadIn input = new PoxPayloadIn(res.getEntity());
+                OrgauthoritiesCommon orgAuthority = (OrgauthoritiesCommon) extractPart(input,
+                        new OrgAuthorityClient().getCommonPartName(), OrgauthoritiesCommon.class);
+                if (logger.isDebugEnabled()) {
+                    logger.debug(objectAsXmlString(orgAuthority, OrgauthoritiesCommon.class));
+                }
+                Assert.assertNotNull(orgAuthority);
+            } catch (Exception e) {
+                throw new RuntimeException(e);
+            }
         } finally {
-               res.releaseConnection();
+            res.releaseConnection();
         }
     }
 
@@ -592,8 +587,8 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
      * @param testName the test name
      * @throws Exception the exception
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-               groups = {"readItem"}, dependsOnGroups = {"read"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"readItem"}, dependsOnGroups = {"read"})
     public void readItem(String testName) throws Exception {
         readItemInternal(testName, knownResourceId, null, knownItemResourceId, null);
     }
@@ -607,20 +602,19 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
      * @param testName the test name
      * @throws Exception the exception
     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-               groups = {"readItem"}, dependsOnGroups = {"read"})
+    groups = {"readItem"}, dependsOnGroups = {"read"})
     public void readItemInNamedAuth(String testName) throws Exception {
-        readItemInternal(testName, null, knownResourceShortIdentifer, knownItemResourceId, null);
+    readItemInternal(testName, null, knownResourceShortIdentifer, knownItemResourceId, null);
     }
      */
-
     /**
      * Read named item.
      *
      * @param testName the test name
      * @throws Exception the exception
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-               groups = {"readItem"}, dependsOnGroups = {"read"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"readItem"}, dependsOnGroups = {"read"})
     public void readNamedItem(String testName) throws Exception {
         readItemInternal(testName, knownResourceId, null, null, knownItemResourceShortIdentifer);
     }
@@ -631,15 +625,15 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
      * @param testName the test name
      * @throws Exception the exception
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-               groups = {"readItem"}, dependsOnGroups = {"read"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"readItem"}, dependsOnGroups = {"read"})
     public void readNamedItemInNamedAuth(String testName) throws Exception {
         readItemInternal(testName, null, knownResourceShortIdentifer, null, knownItemResourceShortIdentifer);
     }
 
-    protected void readItemInternal(String testName, 
-               String authCSID, String authShortId, String itemCSID, String itemShortId) 
-       throws Exception {
+    protected void readItemInternal(String testName,
+            String authCSID, String authShortId, String itemCSID, String itemShortId)
+            throws Exception {
 
         if (logger.isDebugEnabled()) {
             logger.debug(testBanner(testName, CLASS_NAME));
@@ -650,59 +644,59 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
         // Submit the request to the service and store the response.
         OrgAuthorityClient client = new OrgAuthorityClient();
         ClientResponse<String> res = null;
-        if(authCSID!=null) {
-            if(itemCSID!=null) {
+        if (authCSID != null) {
+            if (itemCSID != null) {
                 res = client.readItem(authCSID, itemCSID);
-            } else if(itemShortId!=null) {
-               res = client.readNamedItem(authCSID, itemShortId);
+            } else if (itemShortId != null) {
+                res = client.readNamedItem(authCSID, itemShortId);
             } else {
-               Assert.fail("readInternal: Internal error. One of CSID or shortId must be non-null");
+                Assert.fail("readInternal: Internal error. One of CSID or shortId must be non-null");
             }
-        } else if(authShortId!=null) {
-            if(itemCSID!=null) {
+        } else if (authShortId != null) {
+            if (itemCSID != null) {
                 res = client.readItemInNamedAuthority(authShortId, itemCSID);
-            } else if(itemShortId!=null) {
-               res = client.readNamedItemInNamedAuthority(authShortId, itemShortId);
+            } else if (itemShortId != null) {
+                res = client.readNamedItemInNamedAuthority(authShortId, itemShortId);
             } else {
-               Assert.fail("readInternal: Internal error. One of CSID or shortId must be non-null");
+                Assert.fail("readInternal: Internal error. One of CSID or shortId must be non-null");
             }
         } else {
-               Assert.fail("readInternal: Internal error. One of authCSID or authShortId must be non-null");
+            Assert.fail("readInternal: Internal error. One of authCSID or authShortId must be non-null");
         }
         try {
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match
-               // the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-       
-               // Check whether we've received a organization.
-               PoxPayloadIn input = new PoxPayloadIn(res.getEntity());
-               OrganizationsCommon organization = (OrganizationsCommon) extractPart(input,
-                       client.getItemCommonPartName(), OrganizationsCommon.class);
-               Assert.assertNotNull(organization);
-               boolean showFull = true;
-               if(showFull && logger.isDebugEnabled()){
-                   logger.debug(testName + ": returned payload:");
-                   logger.debug(objectAsXmlString(organization, OrganizationsCommon.class));
-               }
-
-                // Check that the organization item is within the expected OrgAuthority.
-               Assert.assertEquals(organization.getInAuthority(), knownResourceId);
-
-                // Verify the number and contents of values in a repeatable field,
-                // as created in the instance record used for testing.
-                List<String> contactNames = organization.getContactNames().getContactName();
-                Assert.assertTrue(contactNames.size() > 0);
-                Assert.assertNotNull(contactNames.get(0));
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match
+            // the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+
+            // Check whether we've received a organization.
+            PoxPayloadIn input = new PoxPayloadIn(res.getEntity());
+            OrganizationsCommon organization = (OrganizationsCommon) extractPart(input,
+                    client.getItemCommonPartName(), OrganizationsCommon.class);
+            Assert.assertNotNull(organization);
+            boolean showFull = true;
+            if (showFull && logger.isDebugEnabled()) {
+                logger.debug(testName + ": returned payload:");
+                logger.debug(objectAsXmlString(organization, OrganizationsCommon.class));
+            }
+
+            // Check that the organization item is within the expected OrgAuthority.
+            Assert.assertEquals(organization.getInAuthority(), knownResourceId);
+
+            // Verify the number and contents of values in a repeatable field,
+            // as created in the instance record used for testing.
+            List<String> contactNames = organization.getContactNames().getContactName();
+            Assert.assertTrue(contactNames.size() > 0);
+            Assert.assertNotNull(contactNames.get(0));
 
         } finally {
-               res.releaseConnection();
+            res.releaseConnection();
         }
     }
 
@@ -712,8 +706,8 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
      * @param testName the test name
      * @throws Exception the exception
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-            dependsOnMethods = {"readItem", "updateItem"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    dependsOnMethods = {"readItem", "updateItem"})
     public void verifyItemDisplayName(String testName) throws Exception {
 
         if (logger.isDebugEnabled()) {
@@ -727,33 +721,33 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
         PoxPayloadIn input = null;
         ClientResponse<String> res = client.readItem(knownResourceId, knownItemResourceId);
         try {
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match
-               // the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-       
-               // Check whether organization has expected displayName.
-               input = new PoxPayloadIn(res.getEntity());
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match
+            // the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+
+            // Check whether organization has expected displayName.
+            input = new PoxPayloadIn(res.getEntity());
         } finally {
-               res.releaseConnection();
+            res.releaseConnection();
         }
-        
+
         OrganizationsCommon organization = (OrganizationsCommon) extractPart(input,
                 client.getItemCommonPartName(), OrganizationsCommon.class);
         Assert.assertNotNull(organization);
         String displayName = organization.getDisplayName();
         // Make sure displayName matches computed form
-        String expectedDisplayName = 
-            OrgAuthorityClientUtils.prepareDefaultDisplayName(
+        String expectedDisplayName =
+                OrgAuthorityClientUtils.prepareDefaultDisplayName(
                 TEST_ORG_SHORTNAME, TEST_ORG_FOUNDING_PLACE);
         Assert.assertNotNull(displayName, expectedDisplayName);
-        
+
         // Update the shortName and verify the computed name is updated.
         organization.setCsid(null);
         organization.setDisplayNameComputed(true);
@@ -766,9 +760,9 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
         mainBodyGroups.add(mainBodyGroup);
         organization.setMainBodyGroupList(mainBodyList);
 
-        expectedDisplayName = 
-            OrgAuthorityClientUtils.prepareDefaultDisplayName(
-               updatedShortName, TEST_ORG_FOUNDING_PLACE);
+        expectedDisplayName =
+                OrgAuthorityClientUtils.prepareDefaultDisplayName(
+                updatedShortName, TEST_ORG_FOUNDING_PLACE);
 
         // Submit the updated resource to the service and store the response.
         PoxPayloadOut output = new PoxPayloadOut(OrgAuthorityClient.SERVICE_ITEM_PAYLOAD_NAME);
@@ -776,25 +770,25 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
         commonPart.setLabel(client.getItemCommonPartName());
         res = client.updateItem(knownResourceId, knownItemResourceId, output);
         try {
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug("updateItem: status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-       
-               // Retrieve the updated resource and verify that its contents exist.
-               input = new PoxPayloadIn(res.getEntity());
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug("updateItem: status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+
+            // Retrieve the updated resource and verify that its contents exist.
+            input = new PoxPayloadIn(res.getEntity());
         } finally {
-               res.releaseConnection();
+            res.releaseConnection();
         }
-        
+
         OrganizationsCommon updatedOrganization =
                 (OrganizationsCommon) extractPart(input,
-                        client.getItemCommonPartName(), OrganizationsCommon.class);
+                client.getItemCommonPartName(), OrganizationsCommon.class);
         Assert.assertNotNull(updatedOrganization);
 
         // Verify that the updated resource received the correct data.
@@ -806,7 +800,7 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
 
         // Verify that the updated resource computes the right displayName.
         Assert.assertEquals(updatedOrganization.getDisplayName(), expectedDisplayName,
-            "Updated ShortName in Organization not reflected in computed DisplayName.");
+                "Updated ShortName in Organization not reflected in computed DisplayName.");
 
         // Now Update the displayName, not computed and verify the computed name is overriden.
         organization.setDisplayNameComputed(false);
@@ -819,25 +813,25 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
         commonPart.setLabel(client.getItemCommonPartName());
         res = client.updateItem(knownResourceId, knownItemResourceId, output);
         try {
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug("updateItem: status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-       
-               // Retrieve the updated resource and verify that its contents exist.
-               input = new PoxPayloadIn(res.getEntity());
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug("updateItem: status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+
+            // Retrieve the updated resource and verify that its contents exist.
+            input = new PoxPayloadIn(res.getEntity());
         } finally {
-               res.releaseConnection();
+            res.releaseConnection();
         }
-        
+
         updatedOrganization =
                 (OrganizationsCommon) extractPart(input,
-                        client.getItemCommonPartName(), OrganizationsCommon.class);
+                client.getItemCommonPartName(), OrganizationsCommon.class);
         Assert.assertNotNull(updatedOrganization);
 
         // Verify that the updated resource received the correct data.
@@ -845,7 +839,7 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
                 "Updated displayNameComputed in Organization did not match submitted data.");
         // Verify that the updated resource computes the right displayName.
         Assert.assertEquals(updatedOrganization.getDisplayName(),
-                       expectedDisplayName,
+                expectedDisplayName,
                 "Updated DisplayName (not computed) in Organization not stored.");
     }
 
@@ -855,8 +849,8 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
      * @param testName the test name
      * @throws Exception the exception
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-            dependsOnMethods = {"verifyItemDisplayName"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    dependsOnMethods = {"verifyItemDisplayName"})
     public void verifyIllegalItemDisplayName(String testName) throws Exception {
 
         if (logger.isDebugEnabled()) {
@@ -864,50 +858,50 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
         }
         // Perform setup.
         testSetup(STATUS_BAD_REQUEST, ServiceRequestType.UPDATE);
-       // setupUpdateWithWrongXmlSchema(testName, logger);
+        // setupUpdateWithWrongXmlSchema(testName, logger);
 
         // Submit the request to the service and store the response.
         OrgAuthorityClient client = new OrgAuthorityClient();
         ClientResponse<String> res = client.readItem(knownResourceId, knownItemResourceId);
         try {
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match
-               // the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, Response.Status.OK.getStatusCode());
-       
-               // Check whether organization has expected displayName.
-               PoxPayloadIn input = new PoxPayloadIn(res.getEntity());
-               OrganizationsCommon organization = (OrganizationsCommon) extractPart(input,
-                       client.getItemCommonPartName(), OrganizationsCommon.class);
-               Assert.assertNotNull(organization);
-               // Try to Update with computed false and no displayName
-               organization.setDisplayNameComputed(false);
-               organization.setDisplayName(null);
-       
-               // Submit the updated resource to the service and store the response.
-               PoxPayloadOut output = new PoxPayloadOut(OrgAuthorityClient.SERVICE_ITEM_PAYLOAD_NAME);
-               PayloadOutputPart commonPart = output.addPart(organization, MediaType.APPLICATION_XML_TYPE);
-               commonPart.setLabel(client.getItemCommonPartName());
-               res.releaseConnection();
-               res = client.updateItem(knownResourceId, knownItemResourceId, output);
-               statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug("updateItem: status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-           } finally {
-               res.releaseConnection();
-           }
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match
+            // the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, Response.Status.OK.getStatusCode());
+
+            // Check whether organization has expected displayName.
+            PoxPayloadIn input = new PoxPayloadIn(res.getEntity());
+            OrganizationsCommon organization = (OrganizationsCommon) extractPart(input,
+                    client.getItemCommonPartName(), OrganizationsCommon.class);
+            Assert.assertNotNull(organization);
+            // Try to Update with computed false and no displayName
+            organization.setDisplayNameComputed(false);
+            organization.setDisplayName(null);
+
+            // Submit the updated resource to the service and store the response.
+            PoxPayloadOut output = new PoxPayloadOut(OrgAuthorityClient.SERVICE_ITEM_PAYLOAD_NAME);
+            PayloadOutputPart commonPart = output.addPart(organization, MediaType.APPLICATION_XML_TYPE);
+            commonPart.setLabel(client.getItemCommonPartName());
+            res.releaseConnection();
+            res = client.updateItem(knownResourceId, knownItemResourceId, output);
+            statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug("updateItem: status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+        } finally {
+            res.releaseConnection();
+        }
     }
 
     /**
@@ -916,8 +910,8 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
      * @param testName the test name
      * @throws Exception the exception
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"readItem"}, dependsOnMethods = {"readItem"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"readItem"}, dependsOnMethods = {"readItem"})
     public void readContact(String testName) throws Exception {
 
         if (logger.isDebugEnabled()) {
@@ -929,35 +923,35 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
         // Submit the request to the service and store the response.
         OrgAuthorityClient client = new OrgAuthorityClient();
         ClientResponse<String> res =
-            client.readContact(knownResourceId, knownItemResourceId,
-            knownContactResourceId);
+                client.readContact(knownResourceId, knownItemResourceId,
+                knownContactResourceId);
         try {
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match
-               // the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-       
-               // Check whether we've received a contact.
-               PoxPayloadIn input = new PoxPayloadIn(res.getEntity());
-               ContactsCommon contact = (ContactsCommon) extractPart(input,
-                       new ContactClient().getCommonPartName(), ContactsCommon.class);
-               Assert.assertNotNull(contact);
-               boolean showFull = true;
-               if(showFull && logger.isDebugEnabled()){
-                   logger.debug(testName + ": returned payload:");
-                   logger.debug(objectAsXmlString(contact, ContactsCommon.class));
-               }
-               Assert.assertEquals(contact.getInAuthority(), knownResourceId);
-               Assert.assertEquals(contact.getInItem(), knownItemResourceId);
-           } finally {
-               res.releaseConnection();
-           }
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match
+            // the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+
+            // Check whether we've received a contact.
+            PoxPayloadIn input = new PoxPayloadIn(res.getEntity());
+            ContactsCommon contact = (ContactsCommon) extractPart(input,
+                    new ContactClient().getCommonPartName(), ContactsCommon.class);
+            Assert.assertNotNull(contact);
+            boolean showFull = true;
+            if (showFull && logger.isDebugEnabled()) {
+                logger.debug(testName + ": returned payload:");
+                logger.debug(objectAsXmlString(contact, ContactsCommon.class));
+            }
+            Assert.assertEquals(contact.getInAuthority(), knownResourceId);
+            Assert.assertEquals(contact.getInItem(), knownItemResourceId);
+        } finally {
+            res.releaseConnection();
+        }
     }
 
     // Failure outcomes
@@ -965,8 +959,8 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
      * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#readNonExistent(java.lang.String)
      */
     @Override
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"read"}, dependsOnMethods = {"read"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"read"}, dependsOnMethods = {"read"})
     public void readNonExistent(String testName) {
 
         if (logger.isDebugEnabled()) {
@@ -979,19 +973,19 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
         OrgAuthorityClient client = new OrgAuthorityClient();
         ClientResponse<String> res = client.read(NON_EXISTENT_ID);
         try {
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match
-               // the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-           } finally {
-               res.releaseConnection();
-           }
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match
+            // the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+        } finally {
+            res.releaseConnection();
+        }
     }
 
     /**
@@ -999,8 +993,8 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
      *
      * @param testName the test name
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"readItem"}, dependsOnMethods = {"readItem"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"readItem"}, dependsOnMethods = {"readItem"})
     public void readItemNonExistent(String testName) {
 
         if (logger.isDebugEnabled()) {
@@ -1013,19 +1007,19 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
         OrgAuthorityClient client = new OrgAuthorityClient();
         ClientResponse<String> res = client.readItem(knownResourceId, NON_EXISTENT_ID);
         try {
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match
-               // the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-           } finally {
-               res.releaseConnection();
-           }
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match
+            // the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+        } finally {
+            res.releaseConnection();
+        }
     }
 
     /**
@@ -1033,8 +1027,8 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
      *
      * @param testName the test name
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"readItem"}, dependsOnMethods = {"readContact"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"readItem"}, dependsOnMethods = {"readContact"})
     public void readContactNonExistent(String testName) {
 
         if (logger.isDebugEnabled()) {
@@ -1046,21 +1040,21 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
         // Submit the request to the service and store the response.
         OrgAuthorityClient client = new OrgAuthorityClient();
         ClientResponse<String> res =
-            client.readContact(knownResourceId, knownItemResourceId, NON_EXISTENT_ID);
+                client.readContact(knownResourceId, knownItemResourceId, NON_EXISTENT_ID);
         try {
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match
-               // the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-           } finally {
-               res.releaseConnection();
-           }
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match
+            // the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+        } finally {
+            res.releaseConnection();
+        }
     }
 
     // ---------------------------------------------------------------
@@ -1072,8 +1066,8 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
      * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#readList(java.lang.String)
      */
     @Override
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"readList"}, dependsOnGroups = {"createList", "read"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"readList"}, dependsOnGroups = {"createList", "read"})
     public void readList(String testName) throws Exception {
 
         if (logger.isDebugEnabled()) {
@@ -1086,25 +1080,25 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
         OrgAuthorityClient client = new OrgAuthorityClient();
         ClientResponse<AbstractCommonList> res = client.readList();
         try {
-               AbstractCommonList list = res.getEntity();
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match
-               // the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-       
-               // Optionally output additional data about list members for debugging.
-               if(logger.isTraceEnabled()){
-                       AbstractCommonListUtils.ListItemsInAbstractCommonList(list, logger, testName);
-               }
-           } finally {
-               res.releaseConnection();
-           }
+            AbstractCommonList list = res.getEntity();
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match
+            // the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+
+            // Optionally output additional data about list members for debugging.
+            if (logger.isTraceEnabled()) {
+                AbstractCommonListUtils.ListItemsInAbstractCommonList(list, logger, testName);
+            }
+        } finally {
+            res.releaseConnection();
+        }
     }
 
     /**
@@ -1142,56 +1136,56 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
         // Submit the request to the service and store the response.
         OrgAuthorityClient client = new OrgAuthorityClient();
         ClientResponse<AbstractCommonList> res = null;
-        if(vcsid!= null) {
-               res = client.readItemList(vcsid, null, null);
-        } else if(name!= null) {
-               res = client.readItemListForNamedAuthority(name, null, null);
+        if (vcsid != null) {
+            res = client.readItemList(vcsid, null, null);
+        } else if (name != null) {
+            res = client.readItemListForNamedAuthority(name, null, null);
         } else {
-               Assert.fail("readItemList passed null csid and name!");
+            Assert.fail("readItemList passed null csid and name!");
         }
         try {
-               AbstractCommonList list = res.getEntity();
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match
-               // the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-       
-               List<AbstractCommonList.ListItem> items =
-                   list.getListItem();
-               int nItemsReturned = items.size();
-               // There will be one item created, associated with a
-               // known parent resource, by the createItem test.
-               //
-               // In addition, there will be 'nItemsToCreateInList'
-               // additional items created by the createItemList test,
-               // all associated with the same parent resource.
-               int nExpectedItems = nItemsToCreateInList + 1;
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": Expected "
-                               + nExpectedItems +" items; got: "+nItemsReturned);
-               }
-               Assert.assertEquals(nItemsReturned, nExpectedItems);
-       
+            AbstractCommonList list = res.getEntity();
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match
+            // the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+
+            List<AbstractCommonList.ListItem> items =
+                    list.getListItem();
+            int nItemsReturned = items.size();
+            // There will be one item created, associated with a
+            // known parent resource, by the createItem test.
+            //
+            // In addition, there will be 'nItemsToCreateInList'
+            // additional items created by the createItemList test,
+            // all associated with the same parent resource.
+            int nExpectedItems = nItemsToCreateInList + 1;
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": Expected "
+                        + nExpectedItems + " items; got: " + nItemsReturned);
+            }
+            Assert.assertEquals(nItemsReturned, nExpectedItems);
+
             for (AbstractCommonList.ListItem item : items) {
-               String value = 
-                       AbstractCommonListUtils.ListItemGetElementValue(item, REFNAME);
+                String value =
+                        AbstractCommonListUtils.ListItemGetElementValue(item, REFNAME);
                 Assert.assertTrue((null != value), "Item refName is null!");
-               value = 
-                       AbstractCommonListUtils.ListItemGetElementValue(item, DISPLAYNAME);
+                value =
+                        AbstractCommonListUtils.ListItemGetElementValue(item, DISPLAYNAME);
                 Assert.assertTrue((null != value), "Item displayName is null!");
             }
-            if(logger.isTraceEnabled()){
-               AbstractCommonListUtils.ListItemsInAbstractCommonList(list, logger, testName);
+            if (logger.isTraceEnabled()) {
+                AbstractCommonListUtils.ListItemsInAbstractCommonList(list, logger, testName);
             }
-           } finally {
-               res.releaseConnection();
-           }
+        } finally {
+            res.releaseConnection();
+        }
     }
 
     /**
@@ -1219,60 +1213,50 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
 
         // Submit the request to the service and store the response.
         OrgAuthorityClient client = new OrgAuthorityClient();
-        ContactsCommonList list = null;
-        ClientResponse<ContactsCommonList> res =
+        AbstractCommonList list = null;
+        ClientResponse<AbstractCommonList> res =
                 client.readContactList(parentcsid, itemcsid);
         try {
-               list = res.getEntity();
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match
-               // the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-       
-               List<ContactsCommonList.ContactListItem> listitems =
-                   list.getContactListItem();
-               int nItemsReturned = listitems.size();
-               // There will be one item created, associated with a
-               // known parent resource, by the createItem test.
-               //
-               // In addition, there will be 'nItemsToCreateInList'
-               // additional items created by the createItemList test,
-               // all associated with the same parent resource.
-               int nExpectedItems = nItemsToCreateInList + 1;
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": Expected "
-                               + nExpectedItems +" items; got: "+nItemsReturned);
-               }
-               Assert.assertEquals(nItemsReturned, nExpectedItems);
-       
-               int i = 0;
-               for (ContactsCommonList.ContactListItem listitem : listitems) {
-                       // Optionally output additional data about list members for debugging.
-                       boolean showDetails = false;
-                       if (showDetails && logger.isDebugEnabled()) {
-                       logger.debug("  " + testName + ": list-item[" + i + "] csid=" +
-                               listitem.getCsid());
-                       logger.debug("  " + testName + ": list-item[" + i + "] addressPlace=" +
-                               listitem.getAddressPlace());
-                       logger.debug("  " + testName + ": list-item[" + i + "] URI=" +
-                               listitem.getUri());
-                   }
-                   i++;
-               }
-           } finally {
-               res.releaseConnection();
-           }
+            list = res.getEntity();
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match
+            // the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+
+            List<AbstractCommonList.ListItem> listitems =
+                list.getListItem();
+            int nItemsReturned = listitems.size();
+            // There will be one item created, associated with a
+            // known parent resource, by the createItem test.
+            //
+            // In addition, there will be 'nItemsToCreateInList'
+            // additional items created by the createItemList test,
+            // all associated with the same parent resource.
+            int nExpectedItems = nItemsToCreateInList + 1;
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": Expected "
+                        + nExpectedItems + " items; got: " + nItemsReturned);
+            }
+            Assert.assertEquals(nItemsReturned, nExpectedItems);
+
+            // Optionally output additional data about list members for debugging.
+            boolean iterateThroughList = false;
+            if (iterateThroughList && logger.isDebugEnabled()) {
+                AbstractCommonListUtils.ListItemsInAbstractCommonList(list, logger, testName);
+            }
+        } finally {
+            res.releaseConnection();
+        }
     }
 
     // Failure outcomes
     // None at present.
-    
     // ---------------------------------------------------------------
     // CRUD tests : UPDATE tests
     // ---------------------------------------------------------------
@@ -1281,8 +1265,8 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
      * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#update(java.lang.String)
      */
     @Override
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"update"}, dependsOnGroups = {"read", "readList"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"update"}, dependsOnGroups = {"read", "readList"})
     public void update(String testName) throws Exception {
 
         if (logger.isDebugEnabled()) {
@@ -1296,57 +1280,57 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
         ClientResponse<String> res =
                 client.read(knownResourceId);
         try {
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": read status = " + res.getStatus());
-               }
-               Assert.assertEquals(res.getStatus(), EXPECTED_STATUS_CODE);
-       
-               if(logger.isDebugEnabled()){
-                   logger.debug("got OrgAuthority to update with ID: " + knownResourceId);
-               }
-               PoxPayloadIn input = new PoxPayloadIn(res.getEntity());
-               OrgauthoritiesCommon orgAuthority = (OrgauthoritiesCommon) extractPart(input,
-                       client.getCommonPartName(), OrgauthoritiesCommon.class);
-               Assert.assertNotNull(orgAuthority);
-       
-               // Update the contents of this resource.
-               orgAuthority.setDisplayName("updated-" + orgAuthority.getDisplayName());
-               orgAuthority.setVocabType("updated-" + orgAuthority.getVocabType());
-               if(logger.isDebugEnabled()){
-                   logger.debug("to be updated OrgAuthority");
-                   logger.debug(objectAsXmlString(orgAuthority, OrgauthoritiesCommon.class));
-               }
-       
-               // Submit the updated resource to the service and store the response.
-               PoxPayloadOut output = new PoxPayloadOut(OrgAuthorityClient.SERVICE_PAYLOAD_NAME);
-               PayloadOutputPart commonPart = output.addPart(orgAuthority, MediaType.APPLICATION_XML_TYPE);
-               commonPart.setLabel(client.getCommonPartName());
-               res.releaseConnection();
-               res = client.update(knownResourceId, output);
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-       
-               // Retrieve the updated resource and verify that its contents exist.
-               input = new PoxPayloadIn(res.getEntity());
-               OrgauthoritiesCommon updatedOrgAuthority =
-                       (OrgauthoritiesCommon) extractPart(input,
-                               client.getCommonPartName(), OrgauthoritiesCommon.class);
-               Assert.assertNotNull(updatedOrgAuthority);
-       
-               // Verify that the updated resource received the correct data.
-               Assert.assertEquals(updatedOrgAuthority.getDisplayName(),
-                       orgAuthority.getDisplayName(),
-                       "Data in updated object did not match submitted data.");
-           } finally {
-               res.releaseConnection();
-           }
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": read status = " + res.getStatus());
+            }
+            Assert.assertEquals(res.getStatus(), EXPECTED_STATUS_CODE);
+
+            if (logger.isDebugEnabled()) {
+                logger.debug("got OrgAuthority to update with ID: " + knownResourceId);
+            }
+            PoxPayloadIn input = new PoxPayloadIn(res.getEntity());
+            OrgauthoritiesCommon orgAuthority = (OrgauthoritiesCommon) extractPart(input,
+                    client.getCommonPartName(), OrgauthoritiesCommon.class);
+            Assert.assertNotNull(orgAuthority);
+
+            // Update the contents of this resource.
+            orgAuthority.setDisplayName("updated-" + orgAuthority.getDisplayName());
+            orgAuthority.setVocabType("updated-" + orgAuthority.getVocabType());
+            if (logger.isDebugEnabled()) {
+                logger.debug("to be updated OrgAuthority");
+                logger.debug(objectAsXmlString(orgAuthority, OrgauthoritiesCommon.class));
+            }
+
+            // Submit the updated resource to the service and store the response.
+            PoxPayloadOut output = new PoxPayloadOut(OrgAuthorityClient.SERVICE_PAYLOAD_NAME);
+            PayloadOutputPart commonPart = output.addPart(orgAuthority, MediaType.APPLICATION_XML_TYPE);
+            commonPart.setLabel(client.getCommonPartName());
+            res.releaseConnection();
+            res = client.update(knownResourceId, output);
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+
+            // Retrieve the updated resource and verify that its contents exist.
+            input = new PoxPayloadIn(res.getEntity());
+            OrgauthoritiesCommon updatedOrgAuthority =
+                    (OrgauthoritiesCommon) extractPart(input,
+                    client.getCommonPartName(), OrgauthoritiesCommon.class);
+            Assert.assertNotNull(updatedOrgAuthority);
+
+            // Verify that the updated resource received the correct data.
+            Assert.assertEquals(updatedOrgAuthority.getDisplayName(),
+                    orgAuthority.getDisplayName(),
+                    "Data in updated object did not match submitted data.");
+        } finally {
+            res.releaseConnection();
+        }
     }
 
     /**
@@ -1355,8 +1339,8 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
      * @param testName the test name
      * @throws Exception the exception
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"update"}, dependsOnMethods = {"update"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"update"}, dependsOnMethods = {"update"})
     public void updateItem(String testName) throws Exception {
 
         if (logger.isDebugEnabled()) {
@@ -1370,69 +1354,69 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
         ClientResponse<String> res =
                 client.readItem(knownResourceId, knownItemResourceId);
         try {
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": read status = " + res.getStatus());
-               }
-               Assert.assertEquals(res.getStatus(), EXPECTED_STATUS_CODE);
-       
-               if(logger.isDebugEnabled()){
-                   logger.debug("got Organization to update with ID: " +
-                       knownItemResourceId +
-                       " in OrgAuthority: " + knownResourceId );
-               }
-               PoxPayloadIn input = new PoxPayloadIn(res.getEntity());
-               OrganizationsCommon organization = (OrganizationsCommon) extractPart(input,
-                       client.getItemCommonPartName(), OrganizationsCommon.class);
-               Assert.assertNotNull(organization);
-       
-               // Update the contents of this resource.
-               organization.setCsid(null);
-
-                MainBodyGroupList mainBodyList = organization.getMainBodyGroupList();
-                Assert.assertNotNull(mainBodyList);
-                List<MainBodyGroup> mainBodyGroups = mainBodyList.getMainBodyGroup();
-                Assert.assertTrue(mainBodyList.getMainBodyGroup().size() > 0);
-                String updatedShortName = "updated-" + mainBodyGroups.get(0).getShortName();
-                mainBodyGroups.get(0).setShortName(updatedShortName);
-
-               if(logger.isDebugEnabled()){
-                   logger.debug("to be updated Organization");
-                   logger.debug(objectAsXmlString(organization,
-                       OrganizationsCommon.class));
-               }
-       
-               // Submit the updated resource to the service and store the response.
-               PoxPayloadOut output = new PoxPayloadOut(OrgAuthorityClient.SERVICE_ITEM_PAYLOAD_NAME);
-               PayloadOutputPart commonPart = output.addPart(organization, MediaType.APPLICATION_XML_TYPE);
-               commonPart.setLabel(client.getItemCommonPartName());
-               res.releaseConnection();
-               res = client.updateItem(knownResourceId, knownItemResourceId, output);
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-       
-               // Retrieve the updated resource and verify that its contents exist.
-               input = new PoxPayloadIn(res.getEntity());
-               OrganizationsCommon updatedOrganization =
-                       (OrganizationsCommon) extractPart(input,
-                               client.getItemCommonPartName(), OrganizationsCommon.class);
-               Assert.assertNotNull(updatedOrganization);
-       
-               // Verify that the updated resource received the correct data.
-                mainBodyList = organization.getMainBodyGroupList();
-                Assert.assertNotNull(mainBodyList);
-                Assert.assertTrue(mainBodyList.getMainBodyGroup().size() > 0);
-                Assert.assertEquals(updatedOrganization.getMainBodyGroupList().getMainBodyGroup().get(0).getShortName(),
-                        updatedShortName, "Data in updated Organization did not match submitted data.");
-           } finally {
-               res.releaseConnection();
-           }
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": read status = " + res.getStatus());
+            }
+            Assert.assertEquals(res.getStatus(), EXPECTED_STATUS_CODE);
+
+            if (logger.isDebugEnabled()) {
+                logger.debug("got Organization to update with ID: "
+                        + knownItemResourceId
+                        + " in OrgAuthority: " + knownResourceId);
+            }
+            PoxPayloadIn input = new PoxPayloadIn(res.getEntity());
+            OrganizationsCommon organization = (OrganizationsCommon) extractPart(input,
+                    client.getItemCommonPartName(), OrganizationsCommon.class);
+            Assert.assertNotNull(organization);
+
+            // Update the contents of this resource.
+            organization.setCsid(null);
+
+            MainBodyGroupList mainBodyList = organization.getMainBodyGroupList();
+            Assert.assertNotNull(mainBodyList);
+            List<MainBodyGroup> mainBodyGroups = mainBodyList.getMainBodyGroup();
+            Assert.assertTrue(mainBodyList.getMainBodyGroup().size() > 0);
+            String updatedShortName = "updated-" + mainBodyGroups.get(0).getShortName();
+            mainBodyGroups.get(0).setShortName(updatedShortName);
+
+            if (logger.isDebugEnabled()) {
+                logger.debug("to be updated Organization");
+                logger.debug(objectAsXmlString(organization,
+                        OrganizationsCommon.class));
+            }
+
+            // Submit the updated resource to the service and store the response.
+            PoxPayloadOut output = new PoxPayloadOut(OrgAuthorityClient.SERVICE_ITEM_PAYLOAD_NAME);
+            PayloadOutputPart commonPart = output.addPart(organization, MediaType.APPLICATION_XML_TYPE);
+            commonPart.setLabel(client.getItemCommonPartName());
+            res.releaseConnection();
+            res = client.updateItem(knownResourceId, knownItemResourceId, output);
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+
+            // Retrieve the updated resource and verify that its contents exist.
+            input = new PoxPayloadIn(res.getEntity());
+            OrganizationsCommon updatedOrganization =
+                    (OrganizationsCommon) extractPart(input,
+                    client.getItemCommonPartName(), OrganizationsCommon.class);
+            Assert.assertNotNull(updatedOrganization);
+
+            // Verify that the updated resource received the correct data.
+            mainBodyList = organization.getMainBodyGroupList();
+            Assert.assertNotNull(mainBodyList);
+            Assert.assertTrue(mainBodyList.getMainBodyGroup().size() > 0);
+            Assert.assertEquals(updatedOrganization.getMainBodyGroupList().getMainBodyGroup().get(0).getShortName(),
+                    updatedShortName, "Data in updated Organization did not match submitted data.");
+        } finally {
+            res.releaseConnection();
+        }
     }
 
     /**
@@ -1441,8 +1425,8 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
      * @param testName the test name
      * @throws Exception the exception
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"update"}, dependsOnMethods = {"updateItem"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"update"}, dependsOnMethods = {"updateItem"})
     public void updateContact(String testName) throws Exception {
 
         if (logger.isDebugEnabled()) {
@@ -1456,60 +1440,71 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
         ClientResponse<String> res =
                 client.readContact(knownResourceId, knownItemResourceId, knownContactResourceId);
         try {
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": read status = " + res.getStatus());
-               }
-               Assert.assertEquals(res.getStatus(), EXPECTED_STATUS_CODE);
-       
-               if(logger.isDebugEnabled()){
-                   logger.debug("got Contact to update with ID: " +
-                       knownContactResourceId +
-                       " in item: " + knownItemResourceId +
-                       " in parent: " + knownResourceId );
-               }
-               PoxPayloadIn input = new PoxPayloadIn(res.getEntity());
-               ContactsCommon contact = (ContactsCommon) extractPart(input,
-                       new ContactClient().getCommonPartName(), ContactsCommon.class);
-               Assert.assertNotNull(contact);
-       
-               // Update the contents of this resource.
-               contact.setAddressPlace("updated-" + contact.getAddressPlace());
-               if(logger.isDebugEnabled()){
-                   logger.debug("to be updated Contact");
-                   logger.debug(objectAsXmlString(contact,
-                       ContactsCommon.class));
-               }
-       
-               // Submit the updated resource to the service and store the response.
-               PoxPayloadOut output = new PoxPayloadOut(ContactClient.SERVICE_PAYLOAD_NAME);
-               PayloadOutputPart commonPart = output.addPart(contact, MediaType.APPLICATION_XML_TYPE);
-               commonPart.setLabel(new ContactClient().getCommonPartName());
-               res.releaseConnection();
-               res = client.updateContact(knownResourceId, knownItemResourceId, knownContactResourceId, output);
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-       
-               // Retrieve the updated resource and verify that its contents exist.
-               input = new PoxPayloadIn(res.getEntity());
-               ContactsCommon updatedContact =
-                       (ContactsCommon) extractPart(input,
-                               new ContactClient().getCommonPartName(), ContactsCommon.class);
-               Assert.assertNotNull(updatedContact);
-       
-               // Verify that the updated resource received the correct data.
-               Assert.assertEquals(updatedContact.getAddressPlace(),
-                       contact.getAddressPlace(),
-                       "Data in updated Contact did not match submitted data.");
-           } finally {
-               res.releaseConnection();
-           }
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": read status = " + res.getStatus());
+            }
+            Assert.assertEquals(res.getStatus(), EXPECTED_STATUS_CODE);
+
+            if (logger.isDebugEnabled()) {
+                logger.debug("got Contact to update with ID: "
+                        + knownContactResourceId
+                        + " in item: " + knownItemResourceId
+                        + " in parent: " + knownResourceId);
+            }
+            PoxPayloadIn input = new PoxPayloadIn(res.getEntity());
+            ContactsCommon contact = (ContactsCommon) extractPart(input,
+                    new ContactClient().getCommonPartName(), ContactsCommon.class);
+            Assert.assertNotNull(contact);
+
+            // Verify the contents of this resource
+            AddressGroupList addressGroupList = contact.getAddressGroupList();
+            Assert.assertNotNull(addressGroupList);
+            List<AddressGroup> addressGroups = addressGroupList.getAddressGroup();
+            Assert.assertNotNull(addressGroups);
+            Assert.assertTrue(addressGroups.size() > 0);
+            String addressPlace1 = addressGroups.get(0).getAddressPlace1();
+            Assert.assertNotNull(addressPlace1);
+
+            // Update the contents of this resource.
+            addressGroups.get(0).setAddressPlace1("updated-" + addressPlace1);
+            contact.setAddressGroupList(addressGroupList);
+            if (logger.isDebugEnabled()) {
+                logger.debug("to be updated Contact");
+                logger.debug(objectAsXmlString(contact,
+                        ContactsCommon.class));
+            }
+
+            // Submit the updated resource to the service and store the response.
+            PoxPayloadOut output = new PoxPayloadOut(ContactClient.SERVICE_PAYLOAD_NAME);
+            PayloadOutputPart commonPart = output.addPart(contact, MediaType.APPLICATION_XML_TYPE);
+            commonPart.setLabel(new ContactClient().getCommonPartName());
+            res.releaseConnection();
+            res = client.updateContact(knownResourceId, knownItemResourceId, knownContactResourceId, output);
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+
+            // Retrieve the updated resource and verify that its contents exist.
+            input = new PoxPayloadIn(res.getEntity());
+            ContactsCommon updatedContact =
+                    (ContactsCommon) extractPart(input,
+                    new ContactClient().getCommonPartName(), ContactsCommon.class);
+            Assert.assertNotNull(updatedContact);
+
+            // Verify that the updated resource received the correct data.
+            Assert.assertEquals(updatedContact.getAddressGroupList().getAddressGroup().get(0).getAddressPlace1(),
+                    contact.getAddressGroupList().getAddressGroup().get(0).getAddressPlace1(),
+                    "Data in updated object did not match submitted data.");
+
+        } finally {
+            res.releaseConnection();
+        }
     }
 
     // Failure outcomes
@@ -1520,7 +1515,7 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
      */
     @Override
     public void updateWithEmptyEntityBody(String testName) throws Exception {
-       //Should this really be empty?
+        //Should this really be empty?
     }
 
     /* (non-Javadoc)
@@ -1528,7 +1523,7 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
      */
     @Override
     public void updateWithMalformedXml(String testName) throws Exception {
-       //Should this really be empty?
+        //Should this really be empty?
     }
 
     /* (non-Javadoc)
@@ -1536,101 +1531,101 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
      */
     @Override
     public void updateWithWrongXmlSchema(String testName) throws Exception {
-       //Should this really be empty?
+        //Should this really be empty?
     }
 
-/*
+    /*
     @Override
     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
-        groups = {"update"}, dependsOnMethods = {"update", "testSubmitRequest"})
+    groups = {"update"}, dependsOnMethods = {"update", "testSubmitRequest"})
     public void updateWithEmptyEntityBody(String testName) throws Exception {
-
-        if (logger.isDebugEnabled()) {
-            logger.debug(testBanner(testName, CLASS_NAME));
-        }
-        // Perform setup.
-        setupUpdateWithEmptyEntityBody();
-
-        // Submit the request to the service and store the response.
-        String method = REQUEST_TYPE.httpMethodName();
-        String url = getResourceURL(knownResourceId);
-        String mediaType = MediaType.APPLICATION_XML;
-        final String entity = "";
-        int statusCode = submitRequest(method, url, mediaType, entity);
-
-        // Check the status code of the response: does it match
-        // the expected response(s)?
-        if(logger.isDebugEnabled()){
-            logger.debug(testName + ": url=" + url +
-                " status=" + statusCode);
-         }
-        Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-        invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-        Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+    
+    if (logger.isDebugEnabled()) {
+    logger.debug(testBanner(testName, CLASS_NAME));
     }
-
+    // Perform setup.
+    setupUpdateWithEmptyEntityBody();
+    
+    // Submit the request to the service and store the response.
+    String method = REQUEST_TYPE.httpMethodName();
+    String url = getResourceURL(knownResourceId);
+    String mediaType = MediaType.APPLICATION_XML;
+    final String entity = "";
+    int statusCode = submitRequest(method, url, mediaType, entity);
+    
+    // Check the status code of the response: does it match
+    // the expected response(s)?
+    if(logger.isDebugEnabled()){
+    logger.debug(testName + ": url=" + url +
+    " status=" + statusCode);
+    }
+    Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+    Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+    }
+    
     @Override
     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
-        groups = {"update"}, dependsOnMethods = {"update", "testSubmitRequest"})
+    groups = {"update"}, dependsOnMethods = {"update", "testSubmitRequest"})
     public void updateWithMalformedXml(String testName) throws Exception {
-
-        if (logger.isDebugEnabled()) {
-            logger.debug(testBanner(testName, CLASS_NAME));
-        }
-        // Perform setup.
-        setupUpdateWithMalformedXml();
-
-        // Submit the request to the service and store the response.
-        String method = REQUEST_TYPE.httpMethodName();
-        String url = getResourceURL(knownResourceId);
-        String mediaType = MediaType.APPLICATION_XML;
-        final String entity = MALFORMED_XML_DATA;
-        int statusCode = submitRequest(method, url, mediaType, entity);
-
-        // Check the status code of the response: does it match
-        // the expected response(s)?
-        if(logger.isDebugEnabled()){
-            logger.debug(testName + ": url=" + url +
-               " status=" + statusCode);
-         }
-        Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-        invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-        Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-        }
-
-        @Override
-        @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
-            groups = {"update"}, dependsOnMethods = {"update", "testSubmitRequest"})
-        public void updateWithWrongXmlSchema(String testName) throws Exception {
-
-        // Perform setup.
-        setupUpdateWithWrongXmlSchema(testName, logger);
-
-        // Submit the request to the service and store the response.
-        String method = REQUEST_TYPE.httpMethodName();
-        String url = getResourceURL(knownResourceId);
-        String mediaType = MediaType.APPLICATION_XML;
-        final String entity = WRONG_XML_SCHEMA_DATA;
-        int statusCode = submitRequest(method, url, mediaType, entity);
-
-        // Check the status code of the response: does it match
-        // the expected response(s)?
-        if(logger.isDebugEnabled()){
-            logger.debug("updateWithWrongXmlSchema: url=" + url +
-                " status=" + statusCode);
-         }
-        Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-        invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-        Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+    
+    if (logger.isDebugEnabled()) {
+    logger.debug(testBanner(testName, CLASS_NAME));
+    }
+    // Perform setup.
+    setupUpdateWithMalformedXml();
+    
+    // Submit the request to the service and store the response.
+    String method = REQUEST_TYPE.httpMethodName();
+    String url = getResourceURL(knownResourceId);
+    String mediaType = MediaType.APPLICATION_XML;
+    final String entity = MALFORMED_XML_DATA;
+    int statusCode = submitRequest(method, url, mediaType, entity);
+    
+    // Check the status code of the response: does it match
+    // the expected response(s)?
+    if(logger.isDebugEnabled()){
+    logger.debug(testName + ": url=" + url +
+    " status=" + statusCode);
+    }
+    Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+    Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+    }
+    
+    @Override
+    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
+    groups = {"update"}, dependsOnMethods = {"update", "testSubmitRequest"})
+    public void updateWithWrongXmlSchema(String testName) throws Exception {
+    
+    // Perform setup.
+    setupUpdateWithWrongXmlSchema(testName, logger);
+    
+    // Submit the request to the service and store the response.
+    String method = REQUEST_TYPE.httpMethodName();
+    String url = getResourceURL(knownResourceId);
+    String mediaType = MediaType.APPLICATION_XML;
+    final String entity = WRONG_XML_SCHEMA_DATA;
+    int statusCode = submitRequest(method, url, mediaType, entity);
+    
+    // Check the status code of the response: does it match
+    // the expected response(s)?
+    if(logger.isDebugEnabled()){
+    logger.debug("updateWithWrongXmlSchema: url=" + url +
+    " status=" + statusCode);
+    }
+    Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+    Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
     }
-*/
+     */
 
     /* (non-Javadoc)
- * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#updateNonExistent(java.lang.String)
- */
-@Override
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"update"}, dependsOnMethods = {"update", "testSubmitRequest"})
    * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#updateNonExistent(java.lang.String)
    */
+    @Override
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"update"}, dependsOnMethods = {"update", "testSubmitRequest"})
     public void updateNonExistent(String testName) throws Exception {
 
         if (logger.isDebugEnabled()) {
@@ -1643,25 +1638,25 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
         // Note: The ID used in this 'create' call may be arbitrary.
         // The only relevant ID may be the one used in update(), below.
         OrgAuthorityClient client = new OrgAuthorityClient();
-       PoxPayloadOut multipart = OrgAuthorityClientUtils.createOrgAuthorityInstance(
-                       NON_EXISTENT_ID, NON_EXISTENT_ID, 
-                               new OrgAuthorityClient().getCommonPartName());
+        PoxPayloadOut multipart = OrgAuthorityClientUtils.createOrgAuthorityInstance(
+                NON_EXISTENT_ID, NON_EXISTENT_ID,
+                new OrgAuthorityClient().getCommonPartName());
         ClientResponse<String> res =
                 client.update(NON_EXISTENT_ID, multipart);
         try {
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match
-               // the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-           } finally {
-               res.releaseConnection();
-           }
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match
+            // the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+        } finally {
+            res.releaseConnection();
+        }
     }
 
     /**
@@ -1670,8 +1665,8 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
      * @param testName the test name
      * @throws Exception the exception
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"update"}, dependsOnMethods = {"updateItem", "testItemSubmitRequest"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"update"}, dependsOnMethods = {"updateItem", "testItemSubmitRequest"})
     public void updateNonExistentItem(String testName) throws Exception {
 
         if (logger.isDebugEnabled()) {
@@ -1684,29 +1679,29 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
         // Note: The ID(s) used when creating the request payload may be arbitrary.
         // The only relevant ID may be the one used in update(), below.
         OrgAuthorityClient client = new OrgAuthorityClient();
-        Map<String, String> nonexOrgMap = new HashMap<String,String>();
+        Map<String, String> nonexOrgMap = new HashMap<String, String>();
         nonexOrgMap.put(OrganizationJAXBSchema.SHORT_IDENTIFIER, "nonExistent");
         nonexOrgMap.put(OrganizationJAXBSchema.SHORT_NAME, "Non-existent");
-        PoxPayloadOut multipart = 
-               OrgAuthorityClientUtils.createOrganizationInstance(
-                       knownResourceRefName,
-                       nonexOrgMap, client.getItemCommonPartName() );
+        PoxPayloadOut multipart =
+                OrgAuthorityClientUtils.createOrganizationInstance(
+                knownResourceRefName,
+                nonexOrgMap, client.getItemCommonPartName());
         ClientResponse<String> res =
                 client.updateItem(knownResourceId, NON_EXISTENT_ID, multipart);
         try {
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match
-               // the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-           } finally {
-               res.releaseConnection();
-           }
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match
+            // the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+        } finally {
+            res.releaseConnection();
+        }
     }
 
     /**
@@ -1715,8 +1710,8 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
      * @param testName the test name
      * @throws Exception the exception
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"update"}, dependsOnMethods = {"updateContact", "testContactSubmitRequest"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"update"}, dependsOnMethods = {"updateContact", "testContactSubmitRequest"})
     public void updateNonExistentContact(String testName) throws Exception {
         // Currently a no-op test
     }
@@ -1725,18 +1720,16 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
     // CRUD tests : DELETE tests
     // ---------------------------------------------------------------
     // Success outcomes
-
     // Note: delete sub-resources in ascending hierarchical order,
     // before deleting their parents.
-
     /**
      * Delete contact.
      *
      * @param testName the test name
      * @throws Exception the exception
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"delete"}, dependsOnGroups = {"create", "read", "readList", "update"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"delete"}, dependsOnGroups = {"create", "read", "readList", "update"})
     public void deleteContact(String testName) throws Exception {
 
         if (logger.isDebugEnabled()) {
@@ -1745,40 +1738,40 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
         // Perform setup.
         setupDelete();
 
-         if(logger.isDebugEnabled()){
-            logger.debug("parentcsid =" + knownResourceId +
-                " itemcsid = " + knownItemResourceId +
-                " csid = " + knownContactResourceId);
+        if (logger.isDebugEnabled()) {
+            logger.debug("parentcsid =" + knownResourceId
+                    + " itemcsid = " + knownItemResourceId
+                    + " csid = " + knownContactResourceId);
         }
 
         // Submit the request to the service and store the response.
         OrgAuthorityClient client = new OrgAuthorityClient();
         ClientResponse<Response> res =
-            client.deleteContact(knownResourceId, knownItemResourceId, knownContactResourceId);
+                client.deleteContact(knownResourceId, knownItemResourceId, knownContactResourceId);
         try {
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match
-               // the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-           } finally {
-               res.releaseConnection();
-           }
-    }
-
-   /**
-    * Delete item.
-    *
-    * @param testName the test name
-    * @throws Exception the exception
-    */
-   @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"delete"}, dependsOnMethods = {"deleteContact"})
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match
+            // the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+        } finally {
+            res.releaseConnection();
+        }
+    }
+
+    /**
+     * Delete item.
+     *
+     * @param testName the test name
+     * @throws Exception the exception
+     */
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"delete"}, dependsOnMethods = {"deleteContact"})
     public void deleteItem(String testName) throws Exception {
 
         if (logger.isDebugEnabled()) {
@@ -1787,36 +1780,36 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
         // Perform setup.
         setupDelete();
 
-        if(logger.isDebugEnabled()){
-            logger.debug("parentcsid =" + knownResourceId +
-                " itemcsid = " + knownItemResourceId);
+        if (logger.isDebugEnabled()) {
+            logger.debug("parentcsid =" + knownResourceId
+                    + " itemcsid = " + knownItemResourceId);
         }
 
         // Submit the request to the service and store the response.
         OrgAuthorityClient client = new OrgAuthorityClient();
         ClientResponse<Response> res = client.deleteItem(knownResourceId, knownItemResourceId);
         try {
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match
-               // the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-           } finally {
-               res.releaseConnection();
-           }
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match
+            // the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+        } finally {
+            res.releaseConnection();
+        }
     }
 
     /* (non-Javadoc)
      * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#delete(java.lang.String)
      */
     @Override
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"delete"}, dependsOnMethods = {"deleteItem"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"delete"}, dependsOnMethods = {"deleteItem"})
     public void delete(String testName) throws Exception {
 
         if (logger.isDebugEnabled()) {
@@ -1825,7 +1818,7 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
         // Perform setup.
         setupDelete();
 
-        if(logger.isDebugEnabled()){
+        if (logger.isDebugEnabled()) {
             logger.debug("parentcsid =" + knownResourceId);
         }
 
@@ -1833,19 +1826,19 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
         OrgAuthorityClient client = new OrgAuthorityClient();
         ClientResponse<Response> res = client.delete(knownResourceId);
         try {
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match
-               // the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-           } finally {
-               res.releaseConnection();
-           }
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match
+            // the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+        } finally {
+            res.releaseConnection();
+        }
     }
 
     // Failure outcomes
@@ -1853,8 +1846,8 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
      * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#deleteNonExistent(java.lang.String)
      */
     @Override
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"delete"}, dependsOnMethods = {"delete"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"delete"}, dependsOnMethods = {"delete"})
     public void deleteNonExistent(String testName) throws Exception {
 
         if (logger.isDebugEnabled()) {
@@ -1867,19 +1860,19 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
         OrgAuthorityClient client = new OrgAuthorityClient();
         ClientResponse<Response> res = client.delete(NON_EXISTENT_ID);
         try {
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match
-               // the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-           } finally {
-               res.releaseConnection();
-           }
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match
+            // the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+        } finally {
+            res.releaseConnection();
+        }
     }
 
     /**
@@ -1887,8 +1880,8 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
      *
      * @param testName the test name
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"delete"}, dependsOnMethods = {"deleteItem"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"delete"}, dependsOnMethods = {"deleteItem"})
     public void deleteNonExistentItem(String testName) {
 
         if (logger.isDebugEnabled()) {
@@ -1901,19 +1894,19 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
         OrgAuthorityClient client = new OrgAuthorityClient();
         ClientResponse<Response> res = client.deleteItem(knownResourceId, NON_EXISTENT_ID);
         try {
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match
-               // the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-           } finally {
-               res.releaseConnection();
-           }
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match
+            // the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+        } finally {
+            res.releaseConnection();
+        }
     }
 
     /**
@@ -1921,8 +1914,8 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
      *
      * @param testName the test name
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"delete"}, dependsOnMethods = {"deleteContact"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"delete"}, dependsOnMethods = {"deleteContact"})
     public void deleteNonExistentContact(String testName) {
 
         if (logger.isDebugEnabled()) {
@@ -1934,21 +1927,21 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
         // Submit the request to the service and store the response.
         OrgAuthorityClient client = new OrgAuthorityClient();
         ClientResponse<Response> res =
-            client.deleteContact(knownResourceId, knownItemResourceId, NON_EXISTENT_ID);
+                client.deleteContact(knownResourceId, knownItemResourceId, NON_EXISTENT_ID);
         try {
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match
-               // the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-           } finally {
-               res.releaseConnection();
-           }
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match
+            // the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+        } finally {
+            res.releaseConnection();
+        }
     }
 
     // ---------------------------------------------------------------
@@ -1971,9 +1964,9 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
 
         // Check the status code of the response: does it match
         // the expected response(s)?
-        if(logger.isDebugEnabled()){
-            logger.debug("testSubmitRequest: url=" + url +
-                " status=" + statusCode);
+        if (logger.isDebugEnabled()) {
+            logger.debug("testSubmitRequest: url=" + url
+                    + " status=" + statusCode);
         }
         Assert.assertEquals(statusCode, EXPECTED_STATUS);
 
@@ -1995,9 +1988,9 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
 
         // Check the status code of the response: does it match
         // the expected response(s)?
-        if(logger.isDebugEnabled()){
-            logger.debug("testItemSubmitRequest: url=" + url +
-                " status=" + statusCode);
+        if (logger.isDebugEnabled()) {
+            logger.debug("testItemSubmitRequest: url=" + url
+                    + " status=" + statusCode);
         }
         Assert.assertEquals(statusCode, EXPECTED_STATUS);
 
@@ -2015,24 +2008,22 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
         // Submit the request to the service and store the response.
         String method = ServiceRequestType.READ.httpMethodName();
         String url = getContactResourceURL(knownResourceId,
-            knownItemResourceId, knownContactResourceId);
+                knownItemResourceId, knownContactResourceId);
         int statusCode = submitRequest(method, url);
 
         // Check the status code of the response: does it match
         // the expected response(s)?
-        if(logger.isDebugEnabled()){
-            logger.debug("testItemSubmitRequest: url=" + url +
-                " status=" + statusCode);
+        if (logger.isDebugEnabled()) {
+            logger.debug("testItemSubmitRequest: url=" + url
+                    + " status=" + statusCode);
         }
         Assert.assertEquals(statusCode, EXPECTED_STATUS);
 
     }
 
-
     // ---------------------------------------------------------------
     // Cleanup of resources created during testing
     // ---------------------------------------------------------------
-    
     /**
      * Deletes all resources created by tests, after all tests have been run.
      *
@@ -2041,21 +2032,20 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
      * at any point during testing, even if some of those resources
      * may be expected to be deleted by certain tests.
      */
-
-    @AfterClass(alwaysRun=true)
+    @AfterClass(alwaysRun = true)
     @Override
     public void cleanUp() {
         String noTest = System.getProperty("noTestCleanup");
-       if(Boolean.TRUE.toString().equalsIgnoreCase(noTest)) {
+        if (Boolean.TRUE.toString().equalsIgnoreCase(noTest)) {
             if (logger.isDebugEnabled()) {
                 logger.debug("Skipping Cleanup phase ...");
             }
             return;
-       }
+        }
         if (logger.isDebugEnabled()) {
             logger.debug("Cleaning up temporary resources created for testing ...");
         }
-        
+
         String parentResourceId;
         String itemResourceId;
         String contactResourceId;
@@ -2068,7 +2058,7 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
             // Note: Any non-success responses from the delete operation
             // below are ignored and not reported.
             ClientResponse<Response> res =
-                client.deleteContact(parentResourceId, itemResourceId, contactResourceId);
+                    client.deleteContact(parentResourceId, itemResourceId, contactResourceId);
             res.releaseConnection();
         }
         // Clean up item resources.
@@ -2078,12 +2068,12 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
             // Note: Any non-success responses from the delete operation
             // below are ignored and not reported.
             ClientResponse<Response> res =
-                client.deleteItem(parentResourceId, itemResourceId);
+                    client.deleteItem(parentResourceId, itemResourceId);
             res.releaseConnection();
         }
         // Clean up parent resources.
         super.cleanUp();
-        
+
     }
 
     // ---------------------------------------------------------------
@@ -2142,7 +2132,6 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
         return getItemServiceRootURL(parentResourceIdentifier) + "/" + itemResourceIdentifier;
     }
 
-
     /**
      * Returns the root URL for the contact service.
      *
@@ -2160,9 +2149,9 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
      * @return The root URL for the contact service.
      */
     protected String getContactServiceRootURL(String parentResourceIdentifier,
-        String itemResourceIdentifier) {
-        return getItemResourceURL(parentResourceIdentifier, itemResourceIdentifier) + "/" +
-                getContactServicePathComponent();
+            String itemResourceIdentifier) {
+        return getItemResourceURL(parentResourceIdentifier, itemResourceIdentifier) + "/"
+                getContactServicePathComponent();
     }
 
     /**
@@ -2178,8 +2167,8 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { //FIXME:
      * @return The URL of a specific resource managed by a service.
      */
     protected String getContactResourceURL(String parentResourceIdentifier,
-        String itemResourceIdentifier, String contactResourceIdentifier) {
+            String itemResourceIdentifier, String contactResourceIdentifier) {
         return getContactServiceRootURL(parentResourceIdentifier,
-            itemResourceIdentifier) + "/" + contactResourceIdentifier;
+                itemResourceIdentifier) + "/" + contactResourceIdentifier;
     }
 }
index fd653102a892e4ae80bdacbb4701bc3253e1a271..a3ea09e7190a0b69a3bcb5d8fb12b6df13b2c9d3 100644 (file)
@@ -34,16 +34,17 @@ import org.collectionspace.services.client.CollectionSpaceClient;
 import org.collectionspace.services.client.PayloadOutputPart;
 import org.collectionspace.services.client.PoxPayloadIn;
 import org.collectionspace.services.client.PoxPayloadOut;
-import org.collectionspace.services.jaxb.AbstractCommonList;
 
 import org.collectionspace.services.client.ContactClient;
 import org.collectionspace.services.client.ContactClientUtils;
 import org.collectionspace.services.common.AbstractCommonListUtils;
+import org.collectionspace.services.contact.AddressGroup;
+import org.collectionspace.services.contact.AddressGroupList;
 import org.collectionspace.services.contact.ContactsCommon;
-import org.collectionspace.services.contact.ContactsCommonList;
 
 import org.collectionspace.services.client.PersonAuthorityClient;
 import org.collectionspace.services.client.PersonAuthorityClientUtils;
+import org.collectionspace.services.jaxb.AbstractCommonList;
 import org.collectionspace.services.PersonJAXBSchema;
 import org.collectionspace.services.person.PersonauthoritiesCommon;
 import org.collectionspace.services.person.PersonsCommon;
@@ -70,81 +71,69 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
     private final Logger logger = LoggerFactory.getLogger(CLASS_NAME);
     private final String REFNAME = "refName";
     private final String DISPLAYNAME = "displayName";
-    
-       @Override
-       public String getServicePathComponent() {
-               return PersonAuthorityClient.SERVICE_PATH_COMPONENT;
-       }
-
-       @Override
-       protected String getServiceName() {
-               return PersonAuthorityClient.SERVICE_NAME;
-       }
-    
+
+    @Override
+    public String getServicePathComponent() {
+        return PersonAuthorityClient.SERVICE_PATH_COMPONENT;
+    }
+
+    @Override
+    protected String getServiceName() {
+        return PersonAuthorityClient.SERVICE_NAME;
+    }
+
     public String getItemServicePathComponent() {
         return AuthorityClient.ITEMS;
-    }  
-    
+    }
     /** The test forename. */
     final String TEST_FORE_NAME = "John";
-    
     /** The test middle name. */
     final String TEST_MIDDLE_NAME = null;
-    
     /** The test surname. */
     final String TEST_SUR_NAME = "Wayne";
-    
     /** The test birthdate. */
     final String TEST_BIRTH_DATE = "May 26, 1907";
-    
     /** The test death date. */
     final String TEST_DEATH_DATE = "June 11, 1979";
-
     // Hold some values for a recently created item to verify upon read.
     private String knownResourceId = null;
     private String knownResourceShortIdentifer = null;
     private String knownResourceRefName = null;
     private String knownItemResourceId = null;
     private String knownItemResourceShortIdentifer = null;
-
     // The resource ID of an item resource used for partial term matching tests.
     private String knownItemPartialTermResourceId = null;
-    
     /** The known contact resource id. */
     private String knownContactResourceId = null;
-    
     /** The n items to create in list. */
     private int nItemsToCreateInList = 3;
-    
     /** The all item resource ids created. */
     private Map<String, String> allItemResourceIdsCreated =
-        new HashMap<String, String>();
-    
+            new HashMap<String, String>();
     /** The all contact resource ids created. */
     private Map<String, String> allContactResourceIdsCreated =
-        new HashMap<String, String>();
+            new HashMap<String, String>();
 
-    protected void setKnownResource( String id, String shortIdentifer,
-               String refName ) {
-       knownResourceId = id;
-       knownResourceShortIdentifer = shortIdentifer;
-       knownResourceRefName = refName;
+    protected void setKnownResource(String id, String shortIdentifer,
+            String refName) {
+        knownResourceId = id;
+        knownResourceShortIdentifer = shortIdentifer;
+        knownResourceRefName = refName;
     }
 
-    protected void setKnownItemResource( String id, String shortIdentifer ) {
-       knownItemResourceId = id;
-       knownItemResourceShortIdentifer = shortIdentifer;
+    protected void setKnownItemResource(String id, String shortIdentifer) {
+        knownItemResourceId = id;
+        knownItemResourceShortIdentifer = shortIdentifer;
     }
 
-    
     /* (non-Javadoc)
      * @see org.collectionspace.services.client.test.BaseServiceTest#getClientInstance()
      */
     @Override
     protected CollectionSpaceClient getClientInstance() {
-       return new PersonAuthorityClient();
+        return new PersonAuthorityClient();
     }
-    
+
     // ---------------------------------------------------------------
     // CRUD tests : CREATE tests
     // ---------------------------------------------------------------
@@ -153,10 +142,10 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
      * @see org.collectionspace.services.client.test.ServiceTest#create(java.lang.String)
      */
     @Override
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"create"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"create"})
     public void create(String testName) throws Exception {
-        
+
         if (logger.isDebugEnabled()) {
             logger.debug(testBanner(testName, CLASS_NAME));
         }
@@ -168,38 +157,38 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
         // Submit the request to the service and store the response.
         PersonAuthorityClient client = new PersonAuthorityClient();
         String shortId = createIdentifier();
-       String displayName = "displayName-" + shortId;
-       String baseRefName = PersonAuthorityClientUtils.createPersonAuthRefName(shortId, null);
-       PoxPayloadOut multipart = 
-            PersonAuthorityClientUtils.createPersonAuthorityInstance(
-           displayName, shortId, client.getCommonPartName());
-        
-       String newID = null;
-       ClientResponse<Response> res = client.create(multipart);
-       try {
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match
-               // the expected response(s)?
-               //
-               // Specifically:
-               // Does it fall within the set of valid status codes?
-               // Does it exactly match the expected status code?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(this.REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(this.REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, this.EXPECTED_STATUS_CODE);
-       
-               newID = PersonAuthorityClientUtils.extractId(res);
-       } finally {
-               res.releaseConnection();
-       }
+        String displayName = "displayName-" + shortId;
+        String baseRefName = PersonAuthorityClientUtils.createPersonAuthRefName(shortId, null);
+        PoxPayloadOut multipart =
+                PersonAuthorityClientUtils.createPersonAuthorityInstance(
+                displayName, shortId, client.getCommonPartName());
+
+        String newID = null;
+        ClientResponse<Response> res = client.create(multipart);
+        try {
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match
+            // the expected response(s)?
+            //
+            // Specifically:
+            // Does it fall within the set of valid status codes?
+            // Does it exactly match the expected status code?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(this.REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(this.REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, this.EXPECTED_STATUS_CODE);
+
+            newID = PersonAuthorityClientUtils.extractId(res);
+        } finally {
+            res.releaseConnection();
+        }
         // Save values for additional tests
-        if (knownResourceId == null){
-               setKnownResource( newID, shortId, baseRefName ); 
-               if (logger.isDebugEnabled()) {
+        if (knownResourceId == null) {
+            setKnownResource(newID, shortId, baseRefName);
+            if (logger.isDebugEnabled()) {
                 logger.debug(testName + ": knownResourceId=" + knownResourceId);
             }
         }
@@ -210,16 +199,16 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
 
     @Override
     protected PoxPayloadOut createInstance(String identifier) {
-       PersonAuthorityClient client = new PersonAuthorityClient();
+        PersonAuthorityClient client = new PersonAuthorityClient();
         String displayName = "displayName-" + identifier;
         PoxPayloadOut multipart = PersonAuthorityClientUtils.createPersonAuthorityInstance(
                 displayName, identifier, client.getCommonPartName());
         return multipart;
     }
-    
+
     @Override
     protected PoxPayloadOut createItemInstance(String parentCsid, String identifier) {
-       String headerLabel = new PersonAuthorityClient().getItemCommonPartName();
+        String headerLabel = new PersonAuthorityClient().getItemCommonPartName();
         HashMap<String, String> personInfo = new HashMap<String, String>();
         String shortId = "johnWayneTempActor";
         personInfo.put(PersonJAXBSchema.DISPLAY_NAME_COMPUTED, "false");
@@ -228,16 +217,16 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
         personInfo.put(PersonJAXBSchema.SHORT_DISPLAY_NAME, "JohnWayneTemp");
         personInfo.put(PersonJAXBSchema.SHORT_IDENTIFIER, shortId);
 
-       return PersonAuthorityClientUtils.createPersonInstance(parentCsid, identifier, personInfo, headerLabel);
+        return PersonAuthorityClientUtils.createPersonInstance(parentCsid, identifier, personInfo, headerLabel);
     }
-    
+
     /**
      * Creates the item.
      *
      * @param testName the test name
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"create"}, dependsOnMethods = {"create"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"create"}, dependsOnMethods = {"create"})
     public void createItem(String testName) {
         if (logger.isDebugEnabled()) {
             logger.debug(testBanner(testName, CLASS_NAME));
@@ -251,30 +240,29 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
      *
      * @param testName the test name
      */
- /*
   /*
     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"create"}, dependsOnMethods = {"create"})
+    groups = {"create"}, dependsOnMethods = {"create"})
     public void createItemWithEmptyShortId(String testName) {
-        if (logger.isDebugEnabled()) {
-            logger.debug(testBanner(testName, CLASS_NAME));
-        }
-        setupCreate();
-
-        // Fill the property map
-        String shortId = "";
-        Map<String, String> fieldProperties = new HashMap<String,String>();
-        fieldProperties.put(PersonJAXBSchema.DISPLAY_NAME_COMPUTED, "false");
-        fieldProperties.put(PersonJAXBSchema.DISPLAY_NAME, "Rod Beck");
-        fieldProperties.put(PersonJAXBSchema.SHORT_DISPLAY_NAME_COMPUTED, "false");
-        fieldProperties.put(PersonJAXBSchema.SHORT_DISPLAY_NAME, "RodBeck");
-
-        final Map NULL_REPEATABLE_FIELD_PROPERTIES = null;
-        String newID = createItemInAuthority(knownResourceId, knownResourceRefName,
-                shortId, fieldProperties, NULL_REPEATABLE_FIELD_PROPERTIES);
-        allResourceIdsCreated.add(newID);
+    if (logger.isDebugEnabled()) {
+    logger.debug(testBanner(testName, CLASS_NAME));
     }
-*/
-
+    setupCreate();
+    
+    // Fill the property map
+    String shortId = "";
+    Map<String, String> fieldProperties = new HashMap<String,String>();
+    fieldProperties.put(PersonJAXBSchema.DISPLAY_NAME_COMPUTED, "false");
+    fieldProperties.put(PersonJAXBSchema.DISPLAY_NAME, "Rod Beck");
+    fieldProperties.put(PersonJAXBSchema.SHORT_DISPLAY_NAME_COMPUTED, "false");
+    fieldProperties.put(PersonJAXBSchema.SHORT_DISPLAY_NAME, "RodBeck");
+    
+    final Map NULL_REPEATABLE_FIELD_PROPERTIES = null;
+    String newID = createItemInAuthority(knownResourceId, knownResourceRefName,
+    shortId, fieldProperties, NULL_REPEATABLE_FIELD_PROPERTIES);
+    allResourceIdsCreated.add(newID);
+    }
+     */
     /**
      * Creates an item in an authority, using test data.
      *
@@ -285,11 +273,11 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
     private String createItemInAuthority(String vcsid, String authRefName) {
 
         final String testName = "createItemInAuthority";
-        if(logger.isDebugEnabled()){
-            logger.debug(testName + ":"+vcsid+"...");
+        if (logger.isDebugEnabled()) {
+            logger.debug(testName + ":" + vcsid + "...");
         }
 
-        Map<String, String> johnWayneMap = new HashMap<String,String>();
+        Map<String, String> johnWayneMap = new HashMap<String, String>();
         //
         // Fill the property map
         //
@@ -306,14 +294,14 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
         johnWayneMap.put(PersonJAXBSchema.BIRTH_DATE, TEST_BIRTH_DATE);
         johnWayneMap.put(PersonJAXBSchema.BIRTH_PLACE, "Winterset, Iowa");
         johnWayneMap.put(PersonJAXBSchema.DEATH_DATE, TEST_DEATH_DATE);
-        johnWayneMap.put(PersonJAXBSchema.BIO_NOTE, "born Marion Robert Morrison and better" +
-            "known by his stage name John Wayne, was an American film actor, director " +
-            "and producer. He epitomized rugged masculinity and has become an enduring " +
-            "American icon. He is famous for his distinctive voice, walk and height. " +
-            "He was also known for his conservative political views and his support in " +
-            "the 1950s for anti-communist positions.");
-
-        Map<String, List<String>> johnWayneRepeatablesMap = new HashMap<String,List<String>>();
+        johnWayneMap.put(PersonJAXBSchema.BIO_NOTE, "born Marion Robert Morrison and better"
+                + "known by his stage name John Wayne, was an American film actor, director "
+                + "and producer. He epitomized rugged masculinity and has become an enduring "
+                + "American icon. He is famous for his distinctive voice, walk and height. "
+                + "He was also known for his conservative political views and his support in "
+                + "the 1950s for anti-communist positions.");
+
+        Map<String, List<String>> johnWayneRepeatablesMap = new HashMap<String, List<String>>();
         List<String> johnWayneGroups = new ArrayList<String>();
         johnWayneGroups.add("Irish");
         johnWayneGroups.add("Scottish");
@@ -336,45 +324,45 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
             Map itemFieldProperties, Map itemRepeatableFieldProperties) {
 
         final String testName = "createItemInAuthority";
-        if(logger.isDebugEnabled()){
-            logger.debug(testName + ":"+vcsid+"...");
+        if (logger.isDebugEnabled()) {
+            logger.debug(testName + ":" + vcsid + "...");
         }
 
         // Submit the request to the service and store the response.
         PersonAuthorityClient client = new PersonAuthorityClient();
-        
-        PoxPayloadOut multipart = 
-            PersonAuthorityClientUtils.createPersonInstance(vcsid, authRefName, itemFieldProperties,
-                itemRepeatableFieldProperties, client.getItemCommonPartName() );
+
+        PoxPayloadOut multipart =
+                PersonAuthorityClientUtils.createPersonInstance(vcsid, authRefName, itemFieldProperties,
+                itemRepeatableFieldProperties, client.getItemCommonPartName());
 
         String newID = null;
         ClientResponse<Response> res = client.createItem(vcsid, multipart);
         try {
-               int statusCode = res.getStatus();
-               // Check the status code of the response: does it match
-               // the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-
-               newID = PersonAuthorityClientUtils.extractId(res);
+            int statusCode = res.getStatus();
+            // Check the status code of the response: does it match
+            // the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+
+            newID = PersonAuthorityClientUtils.extractId(res);
         } finally {
-               res.releaseConnection();
+            res.releaseConnection();
         }
 
         // Store the ID returned from the first item resource created
         // for additional tests below.
-        if (knownItemResourceId == null){
-               setKnownItemResource(newID, shortId);
+        if (knownItemResourceId == null) {
+            setKnownItemResource(newID, shortId);
             if (logger.isDebugEnabled()) {
-                logger.debug(testName + ": knownItemResourceId=" + knownItemResourceId);                
+                logger.debug(testName + ": knownItemResourceId=" + knownItemResourceId);
             }
         }
-        if(logger.isDebugEnabled()){
-            logger.debug(testName + " (created):"+vcsid+"/("+newID+","+shortId+")");
+        if (logger.isDebugEnabled()) {
+            logger.debug(testName + " (created):" + vcsid + "/(" + newID + "," + shortId + ")");
         }
 
         // Store the IDs from any item resources created
@@ -390,8 +378,8 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
      *
      * @param testName the test name
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"create"}, dependsOnMethods = {"createItem"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"create"}, dependsOnMethods = {"createItem"})
     public void createContact(String testName) {
         if (logger.isDebugEnabled()) {
             logger.debug(testBanner(testName, CLASS_NAME));
@@ -400,50 +388,50 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
         String newID = createContactInItem(knownResourceId, knownItemResourceId);
     }
 
-   /**
-    * Creates the contact in item.
-    *
-    * @param parentcsid the parentcsid
-    * @param itemcsid the itemcsid
-    * @return the string
-    */
-   private String createContactInItem(String parentcsid, String itemcsid) {
+    /**
+     * Creates the contact in item.
+     *
+     * @param parentcsid the parentcsid
+     * @param itemcsid the itemcsid
+     * @return the string
+     */
+    private String createContactInItem(String parentcsid, String itemcsid) {
 
         final String testName = "createContactInItem";
-        if(logger.isDebugEnabled()){
+        if (logger.isDebugEnabled()) {
             logger.debug(testName + ":...");
         }
-        
+
         setupCreate();
 
         // Submit the request to the service and store the response.
         PersonAuthorityClient client = new PersonAuthorityClient();
         String identifier = createIdentifier();
         PoxPayloadOut multipart = ContactClientUtils.createContactInstance(parentcsid,
-            itemcsid, identifier, new ContactClient().getCommonPartName());
-        
+                itemcsid, identifier, new ContactClient().getCommonPartName());
+
         String newID = null;
         ClientResponse<Response> res =
-             client.createContact(parentcsid, itemcsid, multipart);
+                client.createContact(parentcsid, itemcsid, multipart);
         try {
-               int statusCode = res.getStatus();
-               // Check the status code of the response: does it match
-               // the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-
-               newID = PersonAuthorityClientUtils.extractId(res);
+            int statusCode = res.getStatus();
+            // Check the status code of the response: does it match
+            // the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+
+            newID = PersonAuthorityClientUtils.extractId(res);
         } finally {
-               res.releaseConnection();
+            res.releaseConnection();
         }
 
         // Store the ID returned from the first contact resource created
         // for additional tests below.
-        if (knownContactResourceId == null){
+        if (knownContactResourceId == null) {
             knownContactResourceId = newID;
             if (logger.isDebugEnabled()) {
                 logger.debug(testName + ": knownContactResourceId=" + knownContactResourceId);
@@ -459,7 +447,6 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
     }
 
     // Failure outcomes
-
     // Placeholders until the three tests below can be uncommented.
     // See Issue CSPACE-401.
     /* (non-Javadoc)
@@ -467,7 +454,7 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
      */
     @Override
     public void createWithEmptyEntityBody(String testName) throws Exception {
-       //Should this really be empty?
+        //Should this really be empty?
     }
 
     /* (non-Javadoc)
@@ -475,7 +462,7 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
      */
     @Override
     public void createWithMalformedXml(String testName) throws Exception {
-       //Should this really be empty?
+        //Should this really be empty?
     }
 
     /* (non-Javadoc)
@@ -483,106 +470,105 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
      */
     @Override
     public void createWithWrongXmlSchema(String testName) throws Exception {
-       //Should this really be empty?
+        //Should this really be empty?
     }
 
-/*
+    /*
     @Override
     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
-        groups = {"create"}, dependsOnMethods = {"create", "testSubmitRequest"})
+    groups = {"create"}, dependsOnMethods = {"create", "testSubmitRequest"})
     public void createWithEmptyEntityBody(String testName) throws Exception {
-
-        if (logger.isDebugEnabled()) {
-            logger.debug(testBanner(testName, CLASS_NAME));
-        }
-        // Perform setup.
-        setupCreateWithEmptyEntityBody();
-
-        // Submit the request to the service and store the response.
-        String method = REQUEST_TYPE.httpMethodName();
-        String url = getServiceRootURL();
-        String mediaType = MediaType.APPLICATION_XML;
-        final String entity = "";
-        int statusCode = submitRequest(method, url, mediaType, entity);
-
-        // Check the status code of the response: does it match
-        // the expected response(s)?
-        if(logger.isDebugEnabled()) {
-            logger.debug(testName + ": url=" + url +
-                " status=" + statusCode);
-         }
-        Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-        invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-        Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+    
+    if (logger.isDebugEnabled()) {
+    logger.debug(testBanner(testName, CLASS_NAME));
     }
-
+    // Perform setup.
+    setupCreateWithEmptyEntityBody();
+    
+    // Submit the request to the service and store the response.
+    String method = REQUEST_TYPE.httpMethodName();
+    String url = getServiceRootURL();
+    String mediaType = MediaType.APPLICATION_XML;
+    final String entity = "";
+    int statusCode = submitRequest(method, url, mediaType, entity);
+    
+    // Check the status code of the response: does it match
+    // the expected response(s)?
+    if(logger.isDebugEnabled()) {
+    logger.debug(testName + ": url=" + url +
+    " status=" + statusCode);
+    }
+    Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+    Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+    }
+    
     @Override
     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
-        groups = {"create"}, dependsOnMethods = {"create", "testSubmitRequest"})
+    groups = {"create"}, dependsOnMethods = {"create", "testSubmitRequest"})
     public void createWithMalformedXml(String testName) throws Exception {
-
-        if (logger.isDebugEnabled()) {
-            logger.debug(testBanner(testName, CLASS_NAME));
-        }
-        // Perform setup.
-        setupCreateWithMalformedXml();
-
-        // Submit the request to the service and store the response.
-        String method = REQUEST_TYPE.httpMethodName();
-        String url = getServiceRootURL();
-        String mediaType = MediaType.APPLICATION_XML;
-        final String entity = MALFORMED_XML_DATA; // Constant from base class.
-        int statusCode = submitRequest(method, url, mediaType, entity);
-
-        // Check the status code of the response: does it match
-        // the expected response(s)?
-        if(logger.isDebugEnabled()){
-            logger.debug(testName + ": url=" + url +
-                " status=" + statusCode);
-         }
-        Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-        invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-        Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+    
+    if (logger.isDebugEnabled()) {
+    logger.debug(testBanner(testName, CLASS_NAME));
     }
-
+    // Perform setup.
+    setupCreateWithMalformedXml();
+    
+    // Submit the request to the service and store the response.
+    String method = REQUEST_TYPE.httpMethodName();
+    String url = getServiceRootURL();
+    String mediaType = MediaType.APPLICATION_XML;
+    final String entity = MALFORMED_XML_DATA; // Constant from base class.
+    int statusCode = submitRequest(method, url, mediaType, entity);
+    
+    // Check the status code of the response: does it match
+    // the expected response(s)?
+    if(logger.isDebugEnabled()){
+    logger.debug(testName + ": url=" + url +
+    " status=" + statusCode);
+    }
+    Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+    Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+    }
+    
     @Override
     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
-        groups = {"create"}, dependsOnMethods = {"create", "testSubmitRequest"})
+    groups = {"create"}, dependsOnMethods = {"create", "testSubmitRequest"})
     public void createWithWrongXmlSchema(String testName) throws Exception {
-
-        if (logger.isDebugEnabled()) {
-            logger.debug(testBanner(testName, CLASS_NAME));
-        }
-        // Perform setup.
-        setupCreateWithWrongXmlSchema();
-
-        // Submit the request to the service and store the response.
-        String method = REQUEST_TYPE.httpMethodName();
-        String url = getServiceRootURL();
-        String mediaType = MediaType.APPLICATION_XML;
-        final String entity = WRONG_XML_SCHEMA_DATA;
-        int statusCode = submitRequest(method, url, mediaType, entity);
-
-        // Check the status code of the response: does it match
-        // the expected response(s)?
-        if(logger.isDebugEnabled()){
-            logger.debug(testName + ": url=" + url +
-                " status=" + statusCode);
-         }
-        Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-        invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-        Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+    
+    if (logger.isDebugEnabled()) {
+    logger.debug(testBanner(testName, CLASS_NAME));
     }
-*/
-
+    // Perform setup.
+    setupCreateWithWrongXmlSchema();
+    
+    // Submit the request to the service and store the response.
+    String method = REQUEST_TYPE.httpMethodName();
+    String url = getServiceRootURL();
+    String mediaType = MediaType.APPLICATION_XML;
+    final String entity = WRONG_XML_SCHEMA_DATA;
+    int statusCode = submitRequest(method, url, mediaType, entity);
+    
+    // Check the status code of the response: does it match
+    // the expected response(s)?
+    if(logger.isDebugEnabled()){
+    logger.debug(testName + ": url=" + url +
+    " status=" + statusCode);
+    }
+    Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+    Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+    }
+     */
     /**
      * Attempts to create an authority with an short identifier that contains
      * non-word characters.
      *
      * @param testName the test name
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"create", "nonWordCharsInShortId"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"create", "nonWordCharsInShortId"})
     public void createWithShortIdNonWordChars(String testName) throws Exception {
         if (logger.isDebugEnabled()) {
             logger.debug(testBanner(testName, CLASS_NAME));
@@ -594,27 +580,27 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
         // Create the payload to be included in the body of the request
         PersonAuthorityClient client = new PersonAuthorityClient();
         String shortId = createIdentifier() + "*" + createIdentifier();
-       String displayName = "displayName-" + shortId;
+        String displayName = "displayName-" + shortId;
         PoxPayloadOut multipart =
-            PersonAuthorityClientUtils.createPersonAuthorityInstance(
-           displayName, shortId, client.getCommonPartName());
+                PersonAuthorityClientUtils.createPersonAuthorityInstance(
+                displayName, shortId, client.getCommonPartName());
 
         // Submit the request to the service and store the response.
-       ClientResponse<Response> res = client.create(multipart);
+        ClientResponse<Response> res = client.create(multipart);
 
-       // Check the status code of the response: does it match
-       // the expected response(s)?
+        // Check the status code of the response: does it match
+        // the expected response(s)?
         try {
             int statusCode = res.getStatus();
-            if(logger.isDebugEnabled()){
+            if (logger.isDebugEnabled()) {
                 logger.debug(testName + ": status = " + statusCode);
             }
             Assert.assertTrue(this.REQUEST_TYPE.isValidStatusCode(statusCode),
                     invalidStatusCodeMessage(this.REQUEST_TYPE, statusCode));
             Assert.assertEquals(statusCode, this.EXPECTED_STATUS_CODE);
-       } finally {
-               res.releaseConnection();
-       }
+        } finally {
+            res.releaseConnection();
+        }
 
     }
 
@@ -624,8 +610,8 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
      *
      * @param testName the test name
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"create", "nonWordCharsInShortId"}, dependsOnMethods = {"create"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"create", "nonWordCharsInShortId"}, dependsOnMethods = {"create"})
     public void createItemWithShortIdNonWordChars(String testName) {
         if (logger.isDebugEnabled()) {
             logger.debug(testBanner(testName, CLASS_NAME));
@@ -634,11 +620,11 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
         REQUEST_TYPE = ServiceRequestType.CREATE;
         testSetup(EXPECTED_STATUS_CODE, REQUEST_TYPE);
 
-         PersonAuthorityClient client = new PersonAuthorityClient();
+        PersonAuthorityClient client = new PersonAuthorityClient();
 
         // Create the payload to be included in the body of the request
         String shortId = "7-Eleven";
-        Map<String, String> fieldProperties = new HashMap<String,String>();
+        Map<String, String> fieldProperties = new HashMap<String, String>();
         fieldProperties.put(PersonJAXBSchema.DISPLAY_NAME_COMPUTED, "false");
         fieldProperties.put(PersonJAXBSchema.DISPLAY_NAME, shortId);
         fieldProperties.put(PersonJAXBSchema.SHORT_DISPLAY_NAME_COMPUTED, "false");
@@ -646,27 +632,27 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
         fieldProperties.put(PersonJAXBSchema.SHORT_IDENTIFIER, shortId);
         final Map NULL_REPEATABLE_FIELD_PROPERTIES = null;
         PoxPayloadOut multipart =
-            PersonAuthorityClientUtils.createPersonInstance(knownResourceId,
+                PersonAuthorityClientUtils.createPersonInstance(knownResourceId,
                 knownResourceRefName, fieldProperties,
                 NULL_REPEATABLE_FIELD_PROPERTIES, client.getItemCommonPartName());
-        
+
         // Send the request and receive a response
         ClientResponse<Response> res = client.createItem(knownResourceId, multipart);
 
         // Check the status code of the response: does it match
-       // the expected response(s)?
+        // the expected response(s)?
         try {
             int statusCode = res.getStatus();
             // Check the status code of the response: does it match
             // the expected response(s)?
-            if(logger.isDebugEnabled()){
+            if (logger.isDebugEnabled()) {
                 logger.debug(testName + ": status = " + statusCode);
             }
             Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
                     invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
             Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
         } finally {
-               res.releaseConnection();
+            res.releaseConnection();
 
         }
     }
@@ -676,13 +662,13 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
     // ---------------------------------------------------------------
     // Success outcomes
     /* (non-Javadoc)
- * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#createList(java.lang.String)
- */
    * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#createList(java.lang.String)
    */
     @Override
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"createList"}, dependsOnGroups = {"create"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"createList"}, dependsOnGroups = {"create"})
     public void createList(String testName) throws Exception {
-         if (logger.isDebugEnabled()) {
+        if (logger.isDebugEnabled()) {
             logger.debug(testBanner(testName, CLASS_NAME));
         }
         for (int i = 0; i < nItemsToCreateInList; i++) {
@@ -696,8 +682,8 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
      * @param testName the test name
      * @throws Exception the exception
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"createList"}, dependsOnMethods = {"createList"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"createList"}, dependsOnMethods = {"createList"})
     public void createItemList(String testName) throws Exception {
         if (logger.isDebugEnabled()) {
             logger.debug(testBanner(testName, CLASS_NAME));
@@ -714,8 +700,8 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
      * @param testName the test name
      * @throws Exception the exception
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"createList"}, dependsOnMethods = {"createItemList"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"createList"}, dependsOnMethods = {"createItemList"})
     public void createContactList(String testName) throws Exception {
         // Add contacts to the initially-created, known item record.
         for (int j = 0; j < nItemsToCreateInList; j++) {
@@ -731,10 +717,10 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
      * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#read(java.lang.String)
      */
     @Override
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"read"}, dependsOnGroups = {"create"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"read"}, dependsOnGroups = {"create"})
     public void read(String testName) throws Exception {
-       readInternal(testName, knownResourceId, null);
+        readInternal(testName, knownResourceId, null);
     }
 
     /**
@@ -743,12 +729,12 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
      * @param testName the test name
      * @throws Exception the exception
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-            groups = {"read"}, dependsOnMethods = {"read"})
-       public void readByName(String testName) throws Exception {
-       readInternal(testName, null, knownResourceShortIdentifer);
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"read"}, dependsOnMethods = {"read"})
+    public void readByName(String testName) throws Exception {
+        readInternal(testName, null, knownResourceShortIdentifer);
     }
-    
+
     protected void readInternal(String testName, String CSID, String shortId) {
         if (logger.isDebugEnabled()) {
             logger.debug(testBanner(testName, CLASS_NAME));
@@ -759,34 +745,34 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
         // Submit the request to the service and store the response.
         PersonAuthorityClient client = new PersonAuthorityClient();
         ClientResponse<String> res = null;
-        if(CSID!=null) {
+        if (CSID != null) {
             res = client.read(CSID);
-        } else if(shortId!=null) {
-               res = client.readByName(shortId);
+        } else if (shortId != null) {
+            res = client.readByName(shortId);
         } else {
-               Assert.fail("readInternal: Internal error. One of CSID or shortId must be non-null");
+            Assert.fail("readInternal: Internal error. One of CSID or shortId must be non-null");
         }
         try {
-               int statusCode = res.getStatus();
-               // Check the status code of the response: does it match
-               // the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-               //FIXME: remove the following try catch once Aron fixes signatures
-               try {
-                   PoxPayloadIn input = new PoxPayloadIn(res.getEntity());
-                   PersonauthoritiesCommon personAuthority = (PersonauthoritiesCommon) extractPart(input,
-                           client.getCommonPartName(), PersonauthoritiesCommon.class);
-                   Assert.assertNotNull(personAuthority);
-               } catch (Exception e) {
-                   throw new RuntimeException(e);
-               }
+            int statusCode = res.getStatus();
+            // Check the status code of the response: does it match
+            // the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+            //FIXME: remove the following try catch once Aron fixes signatures
+            try {
+                PoxPayloadIn input = new PoxPayloadIn(res.getEntity());
+                PersonauthoritiesCommon personAuthority = (PersonauthoritiesCommon) extractPart(input,
+                        client.getCommonPartName(), PersonauthoritiesCommon.class);
+                Assert.assertNotNull(personAuthority);
+            } catch (Exception e) {
+                throw new RuntimeException(e);
+            }
         } finally {
-               res.releaseConnection();
+            res.releaseConnection();
         }
     }
 
@@ -796,8 +782,8 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
      * @param testName the test name
      * @throws Exception the exception
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-               groups = {"readItem"}, dependsOnGroups = {"read"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"readItem"}, dependsOnGroups = {"read"})
     public void readItem(String testName) throws Exception {
         readItemInternal(testName, knownResourceId, null, knownItemResourceId, null);
     }
@@ -808,8 +794,8 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
      * @param testName the test name
      * @throws Exception the exception
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-               groups = {"readItem"}, dependsOnMethods = {"readItem"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"readItem"}, dependsOnMethods = {"readItem"})
     public void readItemInNamedAuth(String testName) throws Exception {
         readItemInternal(testName, null, knownResourceShortIdentifer, knownItemResourceId, null);
     }
@@ -820,8 +806,8 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
      * @param testName the test name
      * @throws Exception the exception
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-               groups = {"readItem"}, dependsOnMethods = {"readItem"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"readItem"}, dependsOnMethods = {"readItem"})
     public void readNamedItem(String testName) throws Exception {
         readItemInternal(testName, knownResourceId, null, null, knownItemResourceShortIdentifer);
     }
@@ -832,20 +818,20 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
      * @param testName the test name
      * @throws Exception the exception
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-               groups = {"readItem"}, dependsOnMethods = {"readItem"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"readItem"}, dependsOnMethods = {"readItem"})
     public void readNamedItemInNamedAuth(String testName) throws Exception {
         readItemInternal(testName, null, knownResourceShortIdentifer, null, knownItemResourceShortIdentifer);
     }
 
-    protected void readItemInternal(String testName, 
-               String authCSID, String authShortId, String itemCSID, String itemShortId) 
-       throws Exception {
+    protected void readItemInternal(String testName,
+            String authCSID, String authShortId, String itemCSID, String itemShortId)
+            throws Exception {
 
         if (logger.isDebugEnabled()) {
             logger.debug(testBanner(testName, CLASS_NAME));
-            logger.debug("Reading:"+((authCSID!=null)?authCSID:authShortId)+"/"+
-                       ((itemCSID!=null)?authCSID:itemShortId));
+            logger.debug("Reading:" + ((authCSID != null) ? authCSID : authShortId) + "/"
+                    + ((itemCSID != null) ? authCSID : itemShortId));
         }
         // Perform setup.
         setupRead();
@@ -853,59 +839,59 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
         // Submit the request to the service and store the response.
         PersonAuthorityClient client = new PersonAuthorityClient();
         ClientResponse<String> res = null;
-        if(authCSID!=null) {
-            if(itemCSID!=null) {
+        if (authCSID != null) {
+            if (itemCSID != null) {
                 res = client.readItem(authCSID, itemCSID);
-            } else if(itemShortId!=null) {
-               res = client.readNamedItem(authCSID, itemShortId);
+            } else if (itemShortId != null) {
+                res = client.readNamedItem(authCSID, itemShortId);
             } else {
-               Assert.fail("readInternal: Internal error. One of CSID or shortId must be non-null");
+                Assert.fail("readInternal: Internal error. One of CSID or shortId must be non-null");
             }
-        } else if(authShortId!=null) {
-            if(itemCSID!=null) {
+        } else if (authShortId != null) {
+            if (itemCSID != null) {
                 res = client.readItemInNamedAuthority(authShortId, itemCSID);
-            } else if(itemShortId!=null) {
-               res = client.readNamedItemInNamedAuthority(authShortId, itemShortId);
+            } else if (itemShortId != null) {
+                res = client.readNamedItemInNamedAuthority(authShortId, itemShortId);
             } else {
-               Assert.fail("readInternal: Internal error. One of CSID or shortId must be non-null");
+                Assert.fail("readInternal: Internal error. One of CSID or shortId must be non-null");
             }
         } else {
-               Assert.fail("readInternal: Internal error. One of authCSID or authShortId must be non-null");
+            Assert.fail("readInternal: Internal error. One of authCSID or authShortId must be non-null");
         }
         try {
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match
-               // the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-       
-               // Check whether we've received a person.
-               PoxPayloadIn input = new PoxPayloadIn(res.getEntity());
-               PersonsCommon person = (PersonsCommon) extractPart(input,
-                       client.getItemCommonPartName(), PersonsCommon.class);
-               Assert.assertNotNull(person);
-               boolean showFull = true;
-               if(showFull && logger.isDebugEnabled()){
-                   logger.debug(testName + ": returned payload:");
-                   logger.debug(objectAsXmlString(person, PersonsCommon.class));
-               }
-
-                // Check that the person item is within the expected Person Authority.
-               Assert.assertEquals(person.getInAuthority(), knownResourceId);
-
-                // Verify the number and contents of values in a repeatable field,
-                // as created in the instance record used for testing.
-                List<String> groups = person.getGroups().getGroup();
-                Assert.assertTrue(groups.size() > 0);
-                Assert.assertNotNull(groups.get(0));
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match
+            // the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+
+            // Check whether we've received a person.
+            PoxPayloadIn input = new PoxPayloadIn(res.getEntity());
+            PersonsCommon person = (PersonsCommon) extractPart(input,
+                    client.getItemCommonPartName(), PersonsCommon.class);
+            Assert.assertNotNull(person);
+            boolean showFull = true;
+            if (showFull && logger.isDebugEnabled()) {
+                logger.debug(testName + ": returned payload:");
+                logger.debug(objectAsXmlString(person, PersonsCommon.class));
+            }
+
+            // Check that the person item is within the expected Person Authority.
+            Assert.assertEquals(person.getInAuthority(), knownResourceId);
+
+            // Verify the number and contents of values in a repeatable field,
+            // as created in the instance record used for testing.
+            List<String> groups = person.getGroups().getGroup();
+            Assert.assertTrue(groups.size() > 0);
+            Assert.assertNotNull(groups.get(0));
 
         } finally {
-               res.releaseConnection();
+            res.releaseConnection();
         }
     }
 
@@ -915,11 +901,11 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
      * @param testName the test name
      * @throws Exception the exception
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-               groups = {"update"}, dependsOnMethods = {"updateItem"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"update"}, dependsOnMethods = {"updateItem"})
     public void verifyItemDisplayNames(String testName) throws Exception {
-        
-         if (logger.isDebugEnabled()) {
+
+        if (logger.isDebugEnabled()) {
             logger.debug(testBanner(testName, CLASS_NAME));
         }
         // Perform setup.
@@ -927,56 +913,56 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
 
         // Submit the request to the service and store the response.
         PersonAuthorityClient client = new PersonAuthorityClient();
-        PoxPayloadIn input =null;
+        PoxPayloadIn input = null;
         ClientResponse<String> res = client.readItem(knownResourceId, knownItemResourceId);
         try {
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match
-               // the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-       
-               // Check whether person has expected displayName.
-               input = new PoxPayloadIn(res.getEntity());
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match
+            // the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+
+            // Check whether person has expected displayName.
+            input = new PoxPayloadIn(res.getEntity());
         } finally {
-               res.releaseConnection();
+            res.releaseConnection();
         }
-               
+
         PersonsCommon person = (PersonsCommon) extractPart(input,
                 client.getItemCommonPartName(), PersonsCommon.class);
         Assert.assertNotNull(person);
         String displayName = person.getDisplayName();
         // Make sure displayName matches computed form
-        String expectedDisplayName = 
-            PersonAuthorityClientUtils.prepareDefaultDisplayName(
-               TEST_FORE_NAME, null, TEST_SUR_NAME,
-               TEST_BIRTH_DATE, TEST_DEATH_DATE);
+        String expectedDisplayName =
+                PersonAuthorityClientUtils.prepareDefaultDisplayName(
+                TEST_FORE_NAME, null, TEST_SUR_NAME,
+                TEST_BIRTH_DATE, TEST_DEATH_DATE);
         Assert.assertFalse(displayName.equals(expectedDisplayName));
-    
+
         String shortDisplayName = person.getShortDisplayName();
         // Make sure displayName matches computed form
-        String expectedShortDisplayName = 
-            PersonAuthorityClientUtils.prepareDefaultDisplayName(
-                       TEST_FORE_NAME, null, TEST_SUR_NAME,null, null);
+        String expectedShortDisplayName =
+                PersonAuthorityClientUtils.prepareDefaultDisplayName(
+                TEST_FORE_NAME, null, TEST_SUR_NAME, null, null);
         Assert.assertFalse(expectedShortDisplayName.equals(shortDisplayName));
-    
+
         // Update the forename and verify the computed name is updated.
         person.setCsid(null);
         person.setDisplayNameComputed(true);
         person.setShortDisplayNameComputed(true);
         person.setForeName("updated-" + TEST_FORE_NAME);
-        expectedDisplayName = 
-            PersonAuthorityClientUtils.prepareDefaultDisplayName(
-               "updated-" + TEST_FORE_NAME, null, TEST_SUR_NAME, 
-               TEST_BIRTH_DATE, TEST_DEATH_DATE);
-        expectedShortDisplayName = 
-            PersonAuthorityClientUtils.prepareDefaultDisplayName(
-                       "updated-" + TEST_FORE_NAME, null, TEST_SUR_NAME,null, null);
+        expectedDisplayName =
+                PersonAuthorityClientUtils.prepareDefaultDisplayName(
+                "updated-" + TEST_FORE_NAME, null, TEST_SUR_NAME,
+                TEST_BIRTH_DATE, TEST_DEATH_DATE);
+        expectedShortDisplayName =
+                PersonAuthorityClientUtils.prepareDefaultDisplayName(
+                "updated-" + TEST_FORE_NAME, null, TEST_SUR_NAME, null, null);
 
         // Submit the updated resource to the service and store the response.
         PoxPayloadOut output = new PoxPayloadOut(PersonAuthorityClient.SERVICE_ITEM_PAYLOAD_NAME);
@@ -984,36 +970,36 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
         commonPart.setLabel(client.getItemCommonPartName());
         res = client.updateItem(knownResourceId, knownItemResourceId, output);
         try {
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug("updateItem: status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-       
-               // Retrieve the updated resource and verify that its contents exist.
-               input = new PoxPayloadIn(res.getEntity());
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug("updateItem: status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+
+            // Retrieve the updated resource and verify that its contents exist.
+            input = new PoxPayloadIn(res.getEntity());
         } finally {
-               res.releaseConnection();
+            res.releaseConnection();
         }
-        
+
         PersonsCommon updatedPerson =
                 (PersonsCommon) extractPart(input,
-                        client.getItemCommonPartName(), PersonsCommon.class);
+                client.getItemCommonPartName(), PersonsCommon.class);
         Assert.assertNotNull(updatedPerson);
 
         // Verify that the updated resource received the correct data.
         Assert.assertEquals(updatedPerson.getForeName(), person.getForeName(),
-            "Updated ForeName in Person did not match submitted data.");
+                "Updated ForeName in Person did not match submitted data.");
         // Verify that the updated resource computes the right displayName.
         Assert.assertEquals(updatedPerson.getDisplayName(), expectedDisplayName,
-            "Updated ForeName in Person not reflected in computed DisplayName.");
+                "Updated ForeName in Person not reflected in computed DisplayName.");
         // Verify that the updated resource computes the right displayName.
         Assert.assertEquals(updatedPerson.getShortDisplayName(), expectedShortDisplayName,
-            "Updated ForeName in Person not reflected in computed ShortDisplayName.");
+                "Updated ForeName in Person not reflected in computed ShortDisplayName.");
 
         // Now Update the displayName, not computed and verify the computed name is overriden.
         person.setDisplayNameComputed(false);
@@ -1028,25 +1014,25 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
         commonPart.setLabel(client.getItemCommonPartName());
         res = client.updateItem(knownResourceId, knownItemResourceId, output);
         try {
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug("updateItem: status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-       
-               // Retrieve the updated resource and verify that its contents exist.
-               input = new PoxPayloadIn(res.getEntity());
-        } finally {
-               res.releaseConnection();
-        }
-        
-        updatedPerson =
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug("updateItem: status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+
+            // Retrieve the updated resource and verify that its contents exist.
+            input = new PoxPayloadIn(res.getEntity());
+        } finally {
+            res.releaseConnection();
+        }
+
+        updatedPerson =
                 (PersonsCommon) extractPart(input,
-                        client.getItemCommonPartName(), PersonsCommon.class);
+                client.getItemCommonPartName(), PersonsCommon.class);
         Assert.assertNotNull(updatedPerson);
 
         // Verify that the updated resource received the correct data.
@@ -1054,14 +1040,14 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
                 "Updated displayNameComputed in Person did not match submitted data.");
         // Verify that the updated resource computes the right displayName.
         Assert.assertEquals(updatedPerson.getDisplayName(),
-                       expectedDisplayName,
+                expectedDisplayName,
                 "Updated DisplayName (not computed) in Person not stored.");
         // Verify that the updated resource received the correct data.
         Assert.assertEquals(updatedPerson.isShortDisplayNameComputed(), false,
                 "Updated shortDisplayNameComputed in Person did not match submitted data.");
         // Verify that the updated resource computes the right displayName.
         Assert.assertEquals(updatedPerson.getShortDisplayName(),
-                       expectedDisplayName,
+                expectedDisplayName,
                 "Updated ShortDisplayName (not computed) in Person not stored.");
     }
 
@@ -1071,8 +1057,8 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
      * @param testName the test name
      * @throws Exception the exception
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-               groups = {"update"}, dependsOnMethods = {"verifyItemDisplayNames"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"update"}, dependsOnMethods = {"verifyItemDisplayNames"})
     public void verifyIllegalItemDisplayName(String testName) throws Exception {
 
         if (logger.isDebugEnabled()) {
@@ -1080,30 +1066,30 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
         }
         // Perform setup.
         testSetup(STATUS_BAD_REQUEST, ServiceRequestType.UPDATE);
-       // setupUpdateWithWrongXmlSchema(testName);
+        // setupUpdateWithWrongXmlSchema(testName);
 
         // Submit the request to the service and store the response.
         PersonAuthorityClient client = new PersonAuthorityClient();
         PoxPayloadIn input = null;
         ClientResponse<String> res = client.readItem(knownResourceId, knownItemResourceId);
         try {
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match
-               // the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, Response.Status.OK.getStatusCode());
-       
-               // Check whether Person has expected displayName.
-               input = new PoxPayloadIn(res.getEntity());
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match
+            // the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, Response.Status.OK.getStatusCode());
+
+            // Check whether Person has expected displayName.
+            input = new PoxPayloadIn(res.getEntity());
         } finally {
-               res.releaseConnection();
+            res.releaseConnection();
         }
-        
+
         PersonsCommon person = (PersonsCommon) extractPart(input,
                 client.getItemCommonPartName(), PersonsCommon.class);
         Assert.assertNotNull(person);
@@ -1117,30 +1103,30 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
         commonPart.setLabel(client.getItemCommonPartName());
         res = client.updateItem(knownResourceId, knownItemResourceId, output);
         try {
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug("updateItem: status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug("updateItem: status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
         } finally {
-               res.releaseConnection();
+            res.releaseConnection();
         }
     }
-    
+
     /**
      * Read contact.
      *
      * @param testName the test name
      * @throws Exception the exception
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"readItem"}, dependsOnMethods = {"readItem"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"readItem"}, dependsOnMethods = {"readItem"})
     public void readContact(String testName) throws Exception {
-        
+
         if (logger.isDebugEnabled()) {
             logger.debug(testBanner(testName, CLASS_NAME));
         }
@@ -1151,31 +1137,31 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
         PersonAuthorityClient client = new PersonAuthorityClient();
         PoxPayloadIn input = null;
         ClientResponse<String> res =
-            client.readContact(knownResourceId, knownItemResourceId,
-            knownContactResourceId);
+                client.readContact(knownResourceId, knownItemResourceId,
+                knownContactResourceId);
         try {
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match
-               // the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-       
-               // Check whether we've received a contact.
-               input = new PoxPayloadIn(res.getEntity());
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match
+            // the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+
+            // Check whether we've received a contact.
+            input = new PoxPayloadIn(res.getEntity());
         } finally {
-               res.releaseConnection();
+            res.releaseConnection();
         }
-        
+
         ContactsCommon contact = (ContactsCommon) extractPart(input,
                 new ContactClient().getCommonPartName(), ContactsCommon.class);
         Assert.assertNotNull(contact);
         boolean showFull = true;
-        if(showFull && logger.isDebugEnabled()){
+        if (showFull && logger.isDebugEnabled()) {
             logger.debug(testName + ": returned payload:");
             logger.debug(objectAsXmlString(contact, ContactsCommon.class));
         }
@@ -1189,8 +1175,8 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
      * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#readNonExistent(java.lang.String)
      */
     @Override
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"read"}, dependsOnMethods = {"read"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"read"}, dependsOnMethods = {"read"})
     public void readNonExistent(String testName) {
 
         if (logger.isDebugEnabled()) {
@@ -1203,17 +1189,17 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
         PersonAuthorityClient client = new PersonAuthorityClient();
         ClientResponse<String> res = client.read(NON_EXISTENT_ID);
         try {
-               int statusCode = res.getStatus();
-               // Check the status code of the response: does it match
-               // the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+            int statusCode = res.getStatus();
+            // Check the status code of the response: does it match
+            // the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
         } finally {
-               res.releaseConnection();
+            res.releaseConnection();
         }
     }
 
@@ -1222,8 +1208,8 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
      *
      * @param testName the test name
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"readItem"}, dependsOnMethods = {"readItem"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"readItem"}, dependsOnMethods = {"readItem"})
     public void readItemNonExistent(String testName) {
 
         if (logger.isDebugEnabled()) {
@@ -1236,18 +1222,18 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
         PersonAuthorityClient client = new PersonAuthorityClient();
         ClientResponse<String> res = client.readItem(knownResourceId, NON_EXISTENT_ID);
         try {
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match
-               // the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match
+            // the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
         } finally {
-               res.releaseConnection();
+            res.releaseConnection();
         }
     }
 
@@ -1256,8 +1242,8 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
      *
      * @param testName the test name
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"readItem"}, dependsOnMethods = {"readContact"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"readItem"}, dependsOnMethods = {"readContact"})
     public void readContactNonExistent(String testName) {
 
         if (logger.isDebugEnabled()) {
@@ -1269,20 +1255,20 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
         // Submit the request to the service and store the response.
         PersonAuthorityClient client = new PersonAuthorityClient();
         ClientResponse<String> res =
-            client.readContact(knownResourceId, knownItemResourceId, NON_EXISTENT_ID);
+                client.readContact(knownResourceId, knownItemResourceId, NON_EXISTENT_ID);
         try {
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match
-               // the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match
+            // the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
         } finally {
-               res.releaseConnection();
+            res.releaseConnection();
         }
     }
 
@@ -1295,8 +1281,8 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
      * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#readList(java.lang.String)
      */
     @Override
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"readList"}, dependsOnGroups = {"createList", "read"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"readList"}, dependsOnGroups = {"createList", "read"})
     public void readList(String testName) throws Exception {
 
         if (logger.isDebugEnabled()) {
@@ -1310,34 +1296,34 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
         AbstractCommonList list = null;
         ClientResponse<AbstractCommonList> res = client.readList();
         try {
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match
-               // the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-       
-               list = res.getEntity();
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match
+            // the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+
+            list = res.getEntity();
         } finally {
-               res.releaseConnection();
+            res.releaseConnection();
         }
 
         // Optionally output additional data about list members for debugging.
         // Optionally output additional data about list members for debugging.
-        if(logger.isTraceEnabled()){
-               AbstractCommonListUtils.ListItemsInAbstractCommonList(list, logger, testName);
+        if (logger.isTraceEnabled()) {
+            AbstractCommonListUtils.ListItemsInAbstractCommonList(list, logger, testName);
         }
     }
 
     /**
      * Read item list.
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-               groups = {"readList"}, dependsOnMethods = {"readList"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"readList"}, dependsOnMethods = {"readList"})
     public void readItemList(String testName) {
         readItemList(knownResourceId, null, testName);
     }
@@ -1345,12 +1331,12 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
     /**
      * Read item list by authority name.
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-               groups = {"readList"}, dependsOnMethods = {"readItemList"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"readList"}, dependsOnMethods = {"readItemList"})
     public void readItemListByAuthorityName(String testName) {
         readItemList(null, knownResourceShortIdentifer, testName);
     }
-    
+
     /**
      * Read item list.
      *
@@ -1361,37 +1347,37 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
 
         // Perform setup.
         setupReadList();
-        
-       // Submit the request to the service and store the response.
+
+        // Submit the request to the service and store the response.
         PersonAuthorityClient client = new PersonAuthorityClient();
         ClientResponse<AbstractCommonList> res = null;
-        if (vcsid!= null) {
-               res = client.readItemList(vcsid, null, null);
-        } else if (name!= null) {
-               res = client.readItemListForNamedAuthority(name, null, null);
+        if (vcsid != null) {
+            res = client.readItemList(vcsid, null, null);
+        } else if (name != null) {
+            res = client.readItemListForNamedAuthority(name, null, null);
         } else {
-               Assert.fail("readItemList passed null csid and name!");
+            Assert.fail("readItemList passed null csid and name!");
         }
         AbstractCommonList list = null;
         try {
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match
-               // the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-
-               list = res.getEntity();
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match
+            // the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+
+            list = res.getEntity();
         } finally {
-               res.releaseConnection();
+            res.releaseConnection();
         }
 
         List<AbstractCommonList.ListItem> items =
-            list.getListItem();
+                list.getListItem();
         int nItemsReturned = items.size();
         // There will be one item created, associated with a
         // known parent resource, by the createItem test.
@@ -1400,22 +1386,22 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
         // additional items created by the createItemList test,
         // all associated with the same parent resource.
         int nExpectedItems = nItemsToCreateInList + 1;
-        if(logger.isDebugEnabled()){
+        if (logger.isDebugEnabled()) {
             logger.debug(testName + ": Expected "
-                       + nExpectedItems +" items; got: "+nItemsReturned);
+                    + nExpectedItems + " items; got: " + nItemsReturned);
         }
         Assert.assertEquals(nItemsReturned, nExpectedItems);
 
         for (AbstractCommonList.ListItem item : items) {
-               String value = 
-                       AbstractCommonListUtils.ListItemGetElementValue(item, REFNAME);
+            String value =
+                    AbstractCommonListUtils.ListItemGetElementValue(item, REFNAME);
             Assert.assertTrue((null != value), "Item refName is null!");
-               value = 
-                       AbstractCommonListUtils.ListItemGetElementValue(item, DISPLAYNAME);
+            value =
+                    AbstractCommonListUtils.ListItemGetElementValue(item, DISPLAYNAME);
             Assert.assertTrue((null != value), "Item displayName is null!");
         }
-        if(logger.isTraceEnabled()){
-               AbstractCommonListUtils.ListItemsInAbstractCommonList(list, logger, testName);
+        if (logger.isTraceEnabled()) {
+            AbstractCommonListUtils.ListItemsInAbstractCommonList(list, logger, testName);
         }
     }
 
@@ -1441,28 +1427,28 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
 
         // Submit the request to the service and store the response.
         PersonAuthorityClient client = new PersonAuthorityClient();
-        ContactsCommonList list = null;
-        ClientResponse<ContactsCommonList> res =
+        AbstractCommonList list = null;
+        ClientResponse<AbstractCommonList> res =
                 client.readContactList(parentcsid, itemcsid);
         try {
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match
-               // the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-       
-               list = res.getEntity();
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match
+            // the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+
+            list = res.getEntity();
         } finally {
-               res.releaseConnection();
+            res.releaseConnection();
         }
-        
-        List<ContactsCommonList.ContactListItem> listitems =
-            list.getContactListItem();
+
+        List<AbstractCommonList.ListItem> listitems =
+                list.getListItem();
         int nItemsReturned = listitems.size();
         // There will be one item created, associated with a
         // known parent resource, by the createItem test.
@@ -1471,32 +1457,21 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
         // additional items created by the createItemList test,
         // all associated with the same parent resource.
         int nExpectedItems = nItemsToCreateInList + 1;
-        if(logger.isDebugEnabled()){
+        if (logger.isDebugEnabled()) {
             logger.debug(testName + ": Expected "
-                       + nExpectedItems +" items; got: "+nItemsReturned);
+                    + nExpectedItems + " items; got: " + nItemsReturned);
         }
         Assert.assertEquals(nItemsReturned, nExpectedItems);
-
-        int i = 0;
-        for (ContactsCommonList.ContactListItem listitem : listitems) {
-               // Optionally output additional data about list members for debugging.
-               boolean showDetails = false;
-               if (showDetails && logger.isDebugEnabled()) {
-                logger.debug("  " + testName + ": list-item[" + i + "] csid=" +
-                        listitem.getCsid());
-                logger.debug("  " + testName + ": list-item[" + i + "] addressPlace=" +
-                        listitem.getAddressPlace());
-                logger.debug("  " + testName + ": list-item[" + i + "] URI=" +
-                        listitem.getUri());
-            }
-            i++;
+        
+        // Optionally output additional data about list members for debugging.
+        boolean iterateThroughList = false;
+        if (iterateThroughList && logger.isDebugEnabled()) {
+            AbstractCommonListUtils.ListItemsInAbstractCommonList(list, logger, testName);
         }
     }
 
     // Failure outcomes
-
     // There are no failure outcome tests at present.
-
     // ---------------------------------------------------------------
     // CRUD tests : UPDATE tests
     // ---------------------------------------------------------------
@@ -1505,8 +1480,8 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
      * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#update(java.lang.String)
      */
     @Override
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"update"}, dependsOnGroups = {"readItem", "readList"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"update"}, dependsOnGroups = {"readItem", "readList"})
     public void update(String testName) throws Exception {
 
         if (logger.isDebugEnabled()) {
@@ -1520,19 +1495,19 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
         PoxPayloadIn input = null;
         ClientResponse<String> res = client.read(knownResourceId);
         try {
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": read status = " + res.getStatus());
-               }
-               Assert.assertEquals(res.getStatus(), EXPECTED_STATUS_CODE);
-       
-               if(logger.isDebugEnabled()){
-                   logger.debug("got PersonAuthority to update with ID: " + knownResourceId);
-               }
-               input = new PoxPayloadIn(res.getEntity());
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": read status = " + res.getStatus());
+            }
+            Assert.assertEquals(res.getStatus(), EXPECTED_STATUS_CODE);
+
+            if (logger.isDebugEnabled()) {
+                logger.debug("got PersonAuthority to update with ID: " + knownResourceId);
+            }
+            input = new PoxPayloadIn(res.getEntity());
         } finally {
-               res.releaseConnection();
+            res.releaseConnection();
         }
-        
+
         PersonauthoritiesCommon personAuthority = (PersonauthoritiesCommon) extractPart(input,
                 client.getCommonPartName(), PersonauthoritiesCommon.class);
         Assert.assertNotNull(personAuthority);
@@ -1540,7 +1515,7 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
         // Update the contents of this resource.
         personAuthority.setDisplayName("updated-" + personAuthority.getDisplayName());
         personAuthority.setVocabType("updated-" + personAuthority.getVocabType());
-        if(logger.isDebugEnabled()){
+        if (logger.isDebugEnabled()) {
             logger.debug("to be updated PersonAuthority");
             logger.debug(objectAsXmlString(personAuthority, PersonauthoritiesCommon.class));
         }
@@ -1551,25 +1526,25 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
         commonPart.setLabel(client.getCommonPartName());
         res = client.update(knownResourceId, output);
         try {
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-       
-               // Retrieve the updated resource and verify that its contents exist.
-               input = new PoxPayloadIn(res.getEntity());
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+
+            // Retrieve the updated resource and verify that its contents exist.
+            input = new PoxPayloadIn(res.getEntity());
         } finally {
-               res.releaseConnection();
+            res.releaseConnection();
         }
-        
+
         PersonauthoritiesCommon updatedPersonAuthority =
                 (PersonauthoritiesCommon) extractPart(input,
-                        client.getCommonPartName(), PersonauthoritiesCommon.class);
+                client.getCommonPartName(), PersonauthoritiesCommon.class);
         Assert.assertNotNull(updatedPersonAuthority);
 
         // Verify that the updated resource received the correct data.
@@ -1584,8 +1559,8 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
      * @param testName the test name
      * @throws Exception the exception
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"update"}, dependsOnMethods = {"update"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"update"}, dependsOnMethods = {"update"})
     public void updateItem(String testName) throws Exception {
 
         if (logger.isDebugEnabled()) {
@@ -1600,70 +1575,70 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
         ClientResponse<String> res =
                 client.readItem(knownResourceId, knownItemResourceId);
         try {
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": read status = " + res.getStatus());
-               }
-               Assert.assertEquals(res.getStatus(), EXPECTED_STATUS_CODE);
-       
-               if(logger.isDebugEnabled()){
-                   logger.debug("got Person to update with ID: " +
-                       knownItemResourceId +
-                       " in PersonAuthority: " + knownResourceId );
-               }
-               input = new PoxPayloadIn(res.getEntity());
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": read status = " + res.getStatus());
+            }
+            Assert.assertEquals(res.getStatus(), EXPECTED_STATUS_CODE);
+
+            if (logger.isDebugEnabled()) {
+                logger.debug("got Person to update with ID: "
+                        + knownItemResourceId
+                        + " in PersonAuthority: " + knownResourceId);
+            }
+            input = new PoxPayloadIn(res.getEntity());
         } finally {
-               res.releaseConnection();
+            res.releaseConnection();
         }
-        
+
         PersonsCommon person = (PersonsCommon) extractPart(input,
                 client.getItemCommonPartName(), PersonsCommon.class);
         Assert.assertNotNull(person);
-        
+
         if (logger.isDebugEnabled() == true) {
-               logger.debug("About to update the following person...");
-               logger.debug(objectAsXmlString(person, PersonsCommon.class));
+            logger.debug("About to update the following person...");
+            logger.debug(objectAsXmlString(person, PersonsCommon.class));
         }
 
         // Update the contents of this resource.
         person.setCsid(null);
         person.setForeName("updated-" + person.getForeName());
-        if(logger.isDebugEnabled()){
+        if (logger.isDebugEnabled()) {
             logger.debug("to be updated Person");
             logger.debug(objectAsXmlString(person,
-                PersonsCommon.class));
-        }    
-        
+                    PersonsCommon.class));
+        }
+
         // Submit the updated resource to the service and store the response.
         PoxPayloadOut output = new PoxPayloadOut(PersonAuthorityClient.SERVICE_ITEM_PAYLOAD_NAME);
         PayloadOutputPart commonPart = output.addPart(person, MediaType.APPLICATION_XML_TYPE);
         commonPart.setLabel(client.getItemCommonPartName());
         res = client.updateItem(knownResourceId, knownItemResourceId, output);
         try {
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-       
-               // Retrieve the updated resource and verify that its contents exist.
-               input = new PoxPayloadIn(res.getEntity());
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+
+            // Retrieve the updated resource and verify that its contents exist.
+            input = new PoxPayloadIn(res.getEntity());
         } finally {
-               res.releaseConnection();
+            res.releaseConnection();
         }
-        
+
         PersonsCommon updatedPerson =
                 (PersonsCommon) extractPart(input,
-                        client.getItemCommonPartName(), PersonsCommon.class);
+                client.getItemCommonPartName(), PersonsCommon.class);
         Assert.assertNotNull(updatedPerson);
-        
+
         if (logger.isDebugEnabled() == true) {
-               logger.debug("Updated to following person to:");
-               logger.debug(objectAsXmlString(updatedPerson, PersonsCommon.class));
-        }        
+            logger.debug("Updated to following person to:");
+            logger.debug(objectAsXmlString(updatedPerson, PersonsCommon.class));
+        }
 
         // Verify that the updated resource received the correct data.
         Assert.assertEquals(updatedPerson.getForeName(),
@@ -1677,10 +1652,10 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
      * @param testName the test name
      * @throws Exception the exception
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"update"}, dependsOnMethods = {"updateItem"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"update"}, dependsOnMethods = {"updateItem"})
     public void updateContact(String testName) throws Exception {
-        
+
         if (logger.isDebugEnabled()) {
             logger.debug(testBanner(testName, CLASS_NAME));
         }
@@ -1693,32 +1668,42 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
         ClientResponse<String> res =
                 client.readContact(knownResourceId, knownItemResourceId, knownContactResourceId);
         try {
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": read status = " + res.getStatus());
-               }
-               Assert.assertEquals(res.getStatus(), EXPECTED_STATUS_CODE);
-       
-               if(logger.isDebugEnabled()){
-                   logger.debug("got Contact to update with ID: " +
-                       knownContactResourceId +
-                       " in item: " + knownItemResourceId +
-                       " in parent: " + knownResourceId );
-               }
-               input = new PoxPayloadIn(res.getEntity());
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": read status = " + res.getStatus());
+            }
+            Assert.assertEquals(res.getStatus(), EXPECTED_STATUS_CODE);
+
+            if (logger.isDebugEnabled()) {
+                logger.debug("got Contact to update with ID: "
+                        + knownContactResourceId
+                        + " in item: " + knownItemResourceId
+                        + " in parent: " + knownResourceId);
+            }
+            input = new PoxPayloadIn(res.getEntity());
         } finally {
-               res.releaseConnection();
+            res.releaseConnection();
         }
-        
+
         ContactsCommon contact = (ContactsCommon) extractPart(input,
                 new ContactClient().getCommonPartName(), ContactsCommon.class);
         Assert.assertNotNull(contact);
 
+        // Verify the contents of this resource
+        AddressGroupList addressGroupList = contact.getAddressGroupList();
+        Assert.assertNotNull(addressGroupList);
+        List<AddressGroup> addressGroups = addressGroupList.getAddressGroup();
+        Assert.assertNotNull(addressGroups);
+        Assert.assertTrue(addressGroups.size() > 0);
+        String addressPlace1 = addressGroups.get(0).getAddressPlace1();
+        Assert.assertNotNull(addressPlace1);
+
         // Update the contents of this resource.
-        contact.setAddressPlace("updated-" + contact.getAddressPlace());
-        if(logger.isDebugEnabled()){
+        addressGroups.get(0).setAddressPlace1("updated-" + addressPlace1);
+        contact.setAddressGroupList(addressGroupList);
+        if (logger.isDebugEnabled()) {
             logger.debug("to be updated Contact");
             logger.debug(objectAsXmlString(contact,
-                ContactsCommon.class));
+                    ContactsCommon.class));
         }
 
         // Submit the updated resource to the service and store the response.
@@ -1727,30 +1712,30 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
         commonPart.setLabel(client.getCommonPartName());
         res = client.updateContact(knownResourceId, knownItemResourceId, knownContactResourceId, output);
         try {
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-       
-               // Retrieve the updated resource and verify that its contents exist.
-               input = new PoxPayloadIn(res.getEntity());;
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+
+            // Retrieve the updated resource and verify that its contents exist.
+            input = new PoxPayloadIn(res.getEntity());;
         } finally {
-               res.releaseConnection();
+            res.releaseConnection();
         }
         ContactsCommon updatedContact =
                 (ContactsCommon) extractPart(input,
-                        new ContactClient().getCommonPartName(), ContactsCommon.class);
+                new ContactClient().getCommonPartName(), ContactsCommon.class);
         Assert.assertNotNull(updatedContact);
 
         // Verify that the updated resource received the correct data.
-        Assert.assertEquals(updatedContact.getAddressPlace(),
-                contact.getAddressPlace(),
-                "Data in updated Contact did not match submitted data.");
+        Assert.assertEquals(updatedContact.getAddressGroupList().getAddressGroup().get(0).getAddressPlace1(),
+                contact.getAddressGroupList().getAddressGroup().get(0).getAddressPlace1(),
+                "Data in updated object did not match submitted data.");
     }
 
     // Failure outcomes
@@ -1761,7 +1746,7 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
      */
     @Override
     public void updateWithEmptyEntityBody(String testName) throws Exception {
-       //Should this really be empty?
+        //Should this really be empty?
     }
 
     /* (non-Javadoc)
@@ -1769,7 +1754,7 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
      */
     @Override
     public void updateWithMalformedXml(String testName) throws Exception {
-       //Should this really be empty?
+        //Should this really be empty?
     }
 
     /* (non-Javadoc)
@@ -1777,104 +1762,104 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
      */
     @Override
     public void updateWithWrongXmlSchema(String testName) throws Exception {
-       //Should this really be empty?
+        //Should this really be empty?
     }
 
-/*     //FIXME: REM - Can we kill all this dead code please?
+    /* //FIXME: REM - Can we kill all this dead code please?
     @Override
     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
-        groups = {"update"}, dependsOnMethods = {"update", "testSubmitRequest"})
+    groups = {"update"}, dependsOnMethods = {"update", "testSubmitRequest"})
     public void updateWithEmptyEntityBody(String testName) throws Exception {
-
-        if (logger.isDebugEnabled()) {
-            logger.debug(testBanner(testName, CLASS_NAME));
-        }
-        // Perform setup.
-        setupUpdateWithEmptyEntityBody(testName, logger);
-
-        // Submit the request to the service and store the response.
-        String method = REQUEST_TYPE.httpMethodName();
-        String url = getResourceURL(knownResourceId);
-        String mediaType = MediaType.APPLICATION_XML;
-        final String entity = "";
-        int statusCode = submitRequest(method, url, mediaType, entity);
-
-        // Check the status code of the response: does it match
-        // the expected response(s)?
-        if(logger.isDebugEnabled()){
-            logger.debug(testName + ": url=" + url +
-                " status=" + statusCode);
-         }
-        Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-        invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-        Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+    
+    if (logger.isDebugEnabled()) {
+    logger.debug(testBanner(testName, CLASS_NAME));
     }
-
+    // Perform setup.
+    setupUpdateWithEmptyEntityBody(testName, logger);
+    
+    // Submit the request to the service and store the response.
+    String method = REQUEST_TYPE.httpMethodName();
+    String url = getResourceURL(knownResourceId);
+    String mediaType = MediaType.APPLICATION_XML;
+    final String entity = "";
+    int statusCode = submitRequest(method, url, mediaType, entity);
+    
+    // Check the status code of the response: does it match
+    // the expected response(s)?
+    if(logger.isDebugEnabled()){
+    logger.debug(testName + ": url=" + url +
+    " status=" + statusCode);
+    }
+    Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+    Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+    }
+    
     @Override
     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
-        groups = {"update"}, dependsOnMethods = {"update", "testSubmitRequest"})
+    groups = {"update"}, dependsOnMethods = {"update", "testSubmitRequest"})
     public void updateWithMalformedXml(String testName) throws Exception {
-
-        if (logger.isDebugEnabled()) {
-            logger.debug(testBanner(testName, CLASS_NAME));
-        }
-        // Perform setup.
-        setupUpdateWithMalformedXml();
-
-        // Submit the request to the service and store the response.
-        String method = REQUEST_TYPE.httpMethodName();
-        String url = getResourceURL(knownResourceId);
-        String mediaType = MediaType.APPLICATION_XML;
-        final String entity = MALFORMED_XML_DATA;
-        int statusCode = submitRequest(method, url, mediaType, entity);
-
-        // Check the status code of the response: does it match
-        // the expected response(s)?
-        if(logger.isDebugEnabled()){
-            logger.debug(testName + ": url=" + url +
-               " status=" + statusCode);
-         }
-        Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-        invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-        Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+    
+    if (logger.isDebugEnabled()) {
+    logger.debug(testBanner(testName, CLASS_NAME));
     }
-
+    // Perform setup.
+    setupUpdateWithMalformedXml();
+    
+    // Submit the request to the service and store the response.
+    String method = REQUEST_TYPE.httpMethodName();
+    String url = getResourceURL(knownResourceId);
+    String mediaType = MediaType.APPLICATION_XML;
+    final String entity = MALFORMED_XML_DATA;
+    int statusCode = submitRequest(method, url, mediaType, entity);
+    
+    // Check the status code of the response: does it match
+    // the expected response(s)?
+    if(logger.isDebugEnabled()){
+    logger.debug(testName + ": url=" + url +
+    " status=" + statusCode);
+    }
+    Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+    Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+    }
+    
     @Override
     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
-        groups = {"update"}, dependsOnMethods = {"update", "testSubmitRequest"})
+    groups = {"update"}, dependsOnMethods = {"update", "testSubmitRequest"})
     public void updateWithWrongXmlSchema(String testName) throws Exception {
-
-        if (logger.isDebugEnabled()) {
-            logger.debug(testBanner(testName, CLASS_NAME));
-        }
-        // Perform setup.
-        setupUpdateWithWrongXmlSchema();
-
-        // Submit the request to the service and store the response.
-        String method = REQUEST_TYPE.httpMethodName();
-        String url = getResourceURL(knownResourceId);
-        String mediaType = MediaType.APPLICATION_XML;
-        final String entity = WRONG_XML_SCHEMA_DATA;
-        int statusCode = submitRequest(method, url, mediaType, entity);
-
-        // Check the status code of the response: does it match
-        // the expected response(s)?
-        if(logger.isDebugEnabled()){
-            logger.debug("updateWithWrongXmlSchema: url=" + url +
-                " status=" + statusCode);
-         }
-        Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-        invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-        Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+    
+    if (logger.isDebugEnabled()) {
+    logger.debug(testBanner(testName, CLASS_NAME));
     }
-*/
+    // Perform setup.
+    setupUpdateWithWrongXmlSchema();
+    
+    // Submit the request to the service and store the response.
+    String method = REQUEST_TYPE.httpMethodName();
+    String url = getResourceURL(knownResourceId);
+    String mediaType = MediaType.APPLICATION_XML;
+    final String entity = WRONG_XML_SCHEMA_DATA;
+    int statusCode = submitRequest(method, url, mediaType, entity);
+    
+    // Check the status code of the response: does it match
+    // the expected response(s)?
+    if(logger.isDebugEnabled()){
+    logger.debug("updateWithWrongXmlSchema: url=" + url +
+    " status=" + statusCode);
+    }
+    Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+    Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+    }
+     */
 
     /* (non-Javadoc)
- * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#updateNonExistent(java.lang.String)
- */
-@Override
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"update"}, dependsOnMethods = {"update", "testSubmitRequest"})
    * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#updateNonExistent(java.lang.String)
    */
+    @Override
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"update"}, dependsOnMethods = {"update", "testSubmitRequest"})
     public void updateNonExistent(String testName) throws Exception {
 
         if (logger.isDebugEnabled()) {
@@ -1888,23 +1873,23 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
         // The only relevant ID may be the one used in update(), below.
         PersonAuthorityClient client = new PersonAuthorityClient();
         String displayName = "displayName-NON_EXISTENT_ID";
-       PoxPayloadOut multipart = PersonAuthorityClientUtils.createPersonAuthorityInstance(
-                               displayName, "NON_EXISTENT_SHORT_ID", client.getCommonPartName());
+        PoxPayloadOut multipart = PersonAuthorityClientUtils.createPersonAuthorityInstance(
+                displayName, "NON_EXISTENT_SHORT_ID", client.getCommonPartName());
         ClientResponse<String> res =
                 client.update(NON_EXISTENT_ID, multipart);
         try {
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match
-               // the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match
+            // the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
         } finally {
-               res.releaseConnection();
+            res.releaseConnection();
         }
     }
 
@@ -1914,8 +1899,8 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
      * @param testName the test name
      * @throws Exception the exception
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"update"}, dependsOnMethods = {"updateItem", "testItemSubmitRequest"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"update"}, dependsOnMethods = {"updateItem", "testItemSubmitRequest"})
     public void updateNonExistentItem(String testName) throws Exception {
 
         if (logger.isDebugEnabled()) {
@@ -1928,31 +1913,31 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
         // Note: The ID used in this 'create' call may be arbitrary.
         // The only relevant ID may be the one used in update(), below.
         PersonAuthorityClient client = new PersonAuthorityClient();
-        Map<String, String> nonexMap = new HashMap<String,String>();
+        Map<String, String> nonexMap = new HashMap<String, String>();
         nonexMap.put(PersonJAXBSchema.SHORT_IDENTIFIER, "nonEX");
         nonexMap.put(PersonJAXBSchema.FORE_NAME, "John");
         nonexMap.put(PersonJAXBSchema.SUR_NAME, "Wayne");
         nonexMap.put(PersonJAXBSchema.GENDER, "male");
         Map<String, List<String>> nonexRepeatablesMap = new HashMap<String, List<String>>();
-        PoxPayloadOut multipart = 
-       PersonAuthorityClientUtils.createPersonInstance(NON_EXISTENT_ID, 
-                       PersonAuthorityClientUtils.createPersonAuthRefName(NON_EXISTENT_ID, null),
-                       nonexMap, nonexRepeatablesMap, client.getItemCommonPartName() );
+        PoxPayloadOut multipart =
+                PersonAuthorityClientUtils.createPersonInstance(NON_EXISTENT_ID,
+                PersonAuthorityClientUtils.createPersonAuthRefName(NON_EXISTENT_ID, null),
+                nonexMap, nonexRepeatablesMap, client.getItemCommonPartName());
         ClientResponse<String> res =
                 client.updateItem(knownResourceId, NON_EXISTENT_ID, multipart);
         try {
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match
-               // the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match
+            // the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
         } finally {
-               res.releaseConnection();
+            res.releaseConnection();
         }
     }
 
@@ -1962,8 +1947,8 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
      * @param testName the test name
      * @throws Exception the exception
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"update"}, dependsOnMethods = {"updateContact", "testContactSubmitRequest"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"update"}, dependsOnMethods = {"updateContact", "testContactSubmitRequest"})
     public void updateNonExistentContact(String testName) throws Exception {
         // Currently a no-op test
     }
@@ -1972,18 +1957,16 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
     // CRUD tests : DELETE tests
     // ---------------------------------------------------------------
     // Success outcomes
-
     // Note: delete sub-resources in ascending hierarchical order,
     // before deleting their parents.
-
     /**
      * Delete contact.
      *
      * @param testName the test name
      * @throws Exception the exception
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class, 
-        groups = {"delete"}, dependsOnGroups = {"update"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"delete"}, dependsOnGroups = {"update"})
     public void deleteContact(String testName) throws Exception {
 
         if (logger.isDebugEnabled()) {
@@ -1992,40 +1975,40 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
         // Perform setup.
         setupDelete();
 
-         if(logger.isDebugEnabled()){
-            logger.debug("parentcsid =" + knownResourceId +
-                " itemcsid = " + knownItemResourceId +
-                " csid = " + knownContactResourceId);
+        if (logger.isDebugEnabled()) {
+            logger.debug("parentcsid =" + knownResourceId
+                    + " itemcsid = " + knownItemResourceId
+                    + " csid = " + knownContactResourceId);
         }
 
         // Submit the request to the service and store the response.
         PersonAuthorityClient client = new PersonAuthorityClient();
         ClientResponse<Response> res =
-            client.deleteContact(knownResourceId, knownItemResourceId, knownContactResourceId);
+                client.deleteContact(knownResourceId, knownItemResourceId, knownContactResourceId);
         try {
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match
-               // the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-           } finally {
-               res.releaseConnection();
-           }
-    }
-
-   /**
-    * Delete item.
-    *
-    * @param testName the test name
-    * @throws Exception the exception
-    */
-   @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"delete"}, dependsOnMethods = {"deleteContact"})
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match
+            // the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+        } finally {
+            res.releaseConnection();
+        }
+    }
+
+    /**
+     * Delete item.
+     *
+     * @param testName the test name
+     * @throws Exception the exception
+     */
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"delete"}, dependsOnMethods = {"deleteContact"})
     public void deleteItem(String testName) throws Exception {
 
         if (logger.isDebugEnabled()) {
@@ -2034,36 +2017,36 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
         // Perform setup.
         setupDelete();
 
-        if(logger.isDebugEnabled()){
-            logger.debug("parentcsid =" + knownResourceId +
-                " itemcsid = " + knownItemResourceId);
+        if (logger.isDebugEnabled()) {
+            logger.debug("parentcsid =" + knownResourceId
+                    + " itemcsid = " + knownItemResourceId);
         }
 
         // Submit the request to the service and store the response.
         PersonAuthorityClient client = new PersonAuthorityClient();
         ClientResponse<Response> res = client.deleteItem(knownResourceId, knownItemResourceId);
         try {
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match
-               // the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-           } finally {
-               res.releaseConnection();
-           }
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match
+            // the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+        } finally {
+            res.releaseConnection();
+        }
     }
 
     /* (non-Javadoc)
      * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#delete(java.lang.String)
      */
     @Override
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"delete"}, dependsOnMethods = {"deleteItem"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"delete"}, dependsOnMethods = {"deleteItem"})
     public void delete(String testName) throws Exception {
 
         if (logger.isDebugEnabled()) {
@@ -2072,7 +2055,7 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
         // Perform setup.
         setupDelete();
 
-        if(logger.isDebugEnabled()){
+        if (logger.isDebugEnabled()) {
             logger.debug("parentcsid =" + knownResourceId);
         }
 
@@ -2080,19 +2063,19 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
         PersonAuthorityClient client = new PersonAuthorityClient();
         ClientResponse<Response> res = client.delete(knownResourceId);
         try {
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match
-               // the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-           } finally {
-               res.releaseConnection();
-           }
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match
+            // the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+        } finally {
+            res.releaseConnection();
+        }
     }
 
     // Failure outcomes
@@ -2100,8 +2083,8 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
      * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#deleteNonExistent(java.lang.String)
      */
     @Override
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"delete"}, dependsOnMethods = {"delete"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"delete"}, dependsOnMethods = {"delete"})
     public void deleteNonExistent(String testName) throws Exception {
 
         if (logger.isDebugEnabled()) {
@@ -2114,19 +2097,19 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
         PersonAuthorityClient client = new PersonAuthorityClient();
         ClientResponse<Response> res = client.delete(NON_EXISTENT_ID);
         try {
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match
-               // the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-           } finally {
-               res.releaseConnection();
-           }
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match
+            // the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+        } finally {
+            res.releaseConnection();
+        }
     }
 
     /**
@@ -2134,8 +2117,8 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
      *
      * @param testName the test name
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"delete"}, dependsOnMethods = {"deleteItem"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"delete"}, dependsOnMethods = {"deleteItem"})
     public void deleteNonExistentItem(String testName) {
 
         if (logger.isDebugEnabled()) {
@@ -2148,19 +2131,19 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
         PersonAuthorityClient client = new PersonAuthorityClient();
         ClientResponse<Response> res = client.deleteItem(knownResourceId, NON_EXISTENT_ID);
         try {
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match
-               // the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-           } finally {
-               res.releaseConnection();
-           }
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match
+            // the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+        } finally {
+            res.releaseConnection();
+        }
     }
 
     /**
@@ -2168,8 +2151,8 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
      *
      * @param testName the test name
      */
-    @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class,
-        groups = {"delete"}, dependsOnMethods = {"deleteContact"})
+    @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
+    groups = {"delete"}, dependsOnMethods = {"deleteContact"})
     public void deleteNonExistentContact(String testName) {
 
         if (logger.isDebugEnabled()) {
@@ -2181,21 +2164,21 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
         // Submit the request to the service and store the response.
         PersonAuthorityClient client = new PersonAuthorityClient();
         ClientResponse<Response> res =
-            client.deleteContact(knownResourceId, knownItemResourceId, NON_EXISTENT_ID);
+                client.deleteContact(knownResourceId, knownItemResourceId, NON_EXISTENT_ID);
         try {
-               int statusCode = res.getStatus();
-       
-               // Check the status code of the response: does it match
-               // the expected response(s)?
-               if(logger.isDebugEnabled()){
-                   logger.debug(testName + ": status = " + statusCode);
-               }
-               Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                       invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-               Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
-           } finally {
-               res.releaseConnection();
-           }
+            int statusCode = res.getStatus();
+
+            // Check the status code of the response: does it match
+            // the expected response(s)?
+            if (logger.isDebugEnabled()) {
+                logger.debug(testName + ": status = " + statusCode);
+            }
+            Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
+                    invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
+        } finally {
+            res.releaseConnection();
+        }
     }
 
     // ---------------------------------------------------------------
@@ -2218,9 +2201,9 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
 
         // Check the status code of the response: does it match
         // the expected response(s)?
-        if(logger.isDebugEnabled()){
-            logger.debug("testSubmitRequest: url=" + url +
-                " status=" + statusCode);
+        if (logger.isDebugEnabled()) {
+            logger.debug("testSubmitRequest: url=" + url
+                    + " status=" + statusCode);
         }
         Assert.assertEquals(statusCode, EXPECTED_STATUS);
 
@@ -2242,9 +2225,9 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
 
         // Check the status code of the response: does it match
         // the expected response(s)?
-        if(logger.isDebugEnabled()){
-            logger.debug("testItemSubmitRequest: url=" + url +
-                " status=" + statusCode);
+        if (logger.isDebugEnabled()) {
+            logger.debug("testItemSubmitRequest: url=" + url
+                    + " status=" + statusCode);
         }
         Assert.assertEquals(statusCode, EXPECTED_STATUS);
 
@@ -2262,24 +2245,22 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
         // Submit the request to the service and store the response.
         String method = ServiceRequestType.READ.httpMethodName();
         String url = getContactResourceURL(knownResourceId,
-            knownItemResourceId, knownContactResourceId);
+                knownItemResourceId, knownContactResourceId);
         int statusCode = submitRequest(method, url);
 
         // Check the status code of the response: does it match
         // the expected response(s)?
-        if(logger.isDebugEnabled()){
-            logger.debug("testItemSubmitRequest: url=" + url +
-                " status=" + statusCode);
+        if (logger.isDebugEnabled()) {
+            logger.debug("testItemSubmitRequest: url=" + url
+                    + " status=" + statusCode);
         }
         Assert.assertEquals(statusCode, EXPECTED_STATUS);
 
     }
 
-
     // ---------------------------------------------------------------
     // Cleanup of resources created during testing
     // ---------------------------------------------------------------
-    
     /**
      * Deletes all resources created by tests, after all tests have been run.
      *
@@ -2288,17 +2269,16 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
      * at any point during testing, even if some of those resources
      * may be expected to be deleted by certain tests.
      */
-
-    @AfterClass(alwaysRun=true)
+    @AfterClass(alwaysRun = true)
     @Override
     public void cleanUp() {
         String noTest = System.getProperty("noTestCleanup");
-       if(Boolean.TRUE.toString().equalsIgnoreCase(noTest)) {
+        if (Boolean.TRUE.toString().equalsIgnoreCase(noTest)) {
             if (logger.isDebugEnabled()) {
                 logger.debug("Skipping Cleanup phase ...");
             }
             return;
-       }
+        }
         if (logger.isDebugEnabled()) {
             logger.debug("Cleaning up temporary resources created for testing ...");
         }
@@ -2314,7 +2294,7 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
             // Note: Any non-success responses from the delete operation
             // below are ignored and not reported.
             ClientResponse<Response> res =
-                client.deleteContact(parentResourceId, itemResourceId, contactResourceId);
+                    client.deleteContact(parentResourceId, itemResourceId, contactResourceId);
             res.releaseConnection();
         }
         // Clean up item resources.
@@ -2324,7 +2304,7 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
             // Note: Any non-success responses from the delete operation
             // below are ignored and not reported.
             ClientResponse<Response> res =
-                client.deleteItem(parentResourceId, itemResourceId);
+                    client.deleteItem(parentResourceId, itemResourceId);
             res.releaseConnection();
         }
         // Clean up parent resources.
@@ -2342,7 +2322,7 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
     public String getContactServicePathComponent() {
         return ContactClient.SERVICE_PATH_COMPONENT;
     }
-    
+
     /**
      * Returns the root URL for the item service.
      *
@@ -2375,7 +2355,6 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
         return getItemServiceRootURL(parentResourceIdentifier) + "/" + itemResourceIdentifier;
     }
 
-
     /**
      * Returns the root URL for the contact service.
      *
@@ -2393,9 +2372,9 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
      * @return The root URL for the contact service.
      */
     protected String getContactServiceRootURL(String parentResourceIdentifier,
-        String itemResourceIdentifier) {
-        return getItemResourceURL(parentResourceIdentifier, itemResourceIdentifier) + "/" +
-                getContactServicePathComponent();
+            String itemResourceIdentifier) {
+        return getItemResourceURL(parentResourceIdentifier, itemResourceIdentifier) + "/"
+                getContactServicePathComponent();
     }
 
     /**
@@ -2411,8 +2390,8 @@ public class PersonAuthorityServiceTest extends AbstractServiceTestImpl { //FIXM
      * @return The URL of a specific resource managed by a service.
      */
     protected String getContactResourceURL(String parentResourceIdentifier,
-        String itemResourceIdentifier, String contactResourceIdentifier) {
+            String itemResourceIdentifier, String contactResourceIdentifier) {
         return getContactServiceRootURL(parentResourceIdentifier,
-            itemResourceIdentifier) + "/" + contactResourceIdentifier;
+                itemResourceIdentifier) + "/" + contactResourceIdentifier;
     }
 }