]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-5119,CSPACE-5135: Modified Person service client tests to reflect addition...
authorAron Roberts <aron@socrates.berkeley.edu>
Tue, 1 May 2012 01:19:21 +0000 (18:19 -0700)
committerAron Roberts <aron@socrates.berkeley.edu>
Tue, 1 May 2012 01:19:21 +0000 (18:19 -0700)
services/person/client/src/main/java/org/collectionspace/services/client/PersonAuthorityClientUtils.java
services/person/client/src/test/java/org/collectionspace/services/client/test/PersonAuthoritySearchTest.java
services/person/client/src/test/java/org/collectionspace/services/client/test/PersonAuthorityServicePerfTest.java
services/person/client/src/test/java/org/collectionspace/services/client/test/PersonAuthorityServiceTest.java

index 267c8ac99b3c13063b677b551ee93e79a6c6a1f8..a0f5668b26b38a93dd580e1aa2b436128f7e2b56 100644 (file)
@@ -41,6 +41,8 @@ import org.collectionspace.services.client.test.ServiceRequestType;
 import org.collectionspace.services.person.GroupList;\r
 import org.collectionspace.services.person.NationalityList;\r
 import org.collectionspace.services.person.OccupationList;\r
+import org.collectionspace.services.person.PersonTermGroup;\r
+import org.collectionspace.services.person.PersonTermGroupList;\r
 import org.collectionspace.services.person.PersonsCommon;\r
 import org.collectionspace.services.person.PersonauthoritiesCommon;\r
 import org.collectionspace.services.person.SchoolOrStyleList;\r
@@ -167,11 +169,12 @@ public class PersonAuthorityClientUtils {
     public static PoxPayloadOut createPersonInstance(String inAuthority,\r
                String personAuthRefName,\r
                Map<String, String> personInfo,\r
+                List<PersonTermGroup> terms,\r
                String headerLabel){\r
         final Map<String, List<String>> EMPTY_PERSON_REPEATABLES_INFO =\r
                 new HashMap<String, List<String>>();\r
-        return createPersonInstance(inAuthority, null /*personAuthRefName*/, personInfo,\r
-                EMPTY_PERSON_REPEATABLES_INFO, headerLabel);\r
+        return createPersonInstance(inAuthority, null /*personAuthRefName*/,\r
+                personInfo, terms, EMPTY_PERSON_REPEATABLES_INFO, headerLabel);\r
     }\r
 \r
     /**\r
@@ -180,12 +183,14 @@ public class PersonAuthorityClientUtils {
      * @param inAuthority the owning authority\r
      * @param personAuthRefName the owning Authority ref name\r
      * @param personInfo the person info\r
+     * @param terms a list of Person terms\r
      * @param personRepeatablesInfo names and values of repeatable scalar fields in the Person record\r
      * @param headerLabel the header label\r
      * @return the multipart output\r
      */\r
     public static PoxPayloadOut createPersonInstance(String inAuthority, \r
                String personAuthRefName, Map<String, String> personInfo,\r
+                List<PersonTermGroup> terms,\r
                 Map<String, List<String>> personRepeatablesInfo, String headerLabel){\r
         PersonsCommon person = new PersonsCommon();\r
         person.setInAuthority(inAuthority);\r
@@ -194,57 +199,10 @@ public class PersonAuthorityClientUtils {
                throw new IllegalArgumentException("shortIdentifier cannot be null or empty");\r
        }       \r
        person.setShortIdentifier(shortId);\r
-               \r
-               //\r
-               // If the 'DISPLAY_NAME_COMPUTED' property is null or empty then\r
-               // we'll assume that the service consumer wants us to compute the\r
-               // display name.  Otherwise, we'll parse the value with the Boolean class.\r
-               //\r
-       String booleanStr = personInfo.get(PersonJAXBSchema.DISPLAY_NAME_COMPUTED);\r
-       boolean displayNameComputed = true;\r
-       if (booleanStr != null && booleanStr.length() > 0) {\r
-               displayNameComputed = Boolean.parseBoolean(booleanStr);\r
-       }\r
-       person.setDisplayNameComputed(displayNameComputed);\r
-\r
-               String displayName = personInfo.get(PersonJAXBSchema.DISPLAY_NAME);\r
-               person.setDisplayName(displayName);\r
-       if (displayNameComputed == false && displayName == null) {\r
-               throw new IllegalArgumentException("displayName cannot be null when displayComputed is 'false'");\r
-       }       \r
-\r
-       booleanStr = personInfo.get(PersonJAXBSchema.SHORT_DISPLAY_NAME_COMPUTED);\r
-       boolean shortDisplayNameComputed = true;\r
-       if (booleanStr != null && booleanStr.length() > 0) {\r
-               shortDisplayNameComputed = Boolean.parseBoolean(booleanStr);\r
-       }\r
-       person.setShortDisplayNameComputed(shortDisplayNameComputed);\r
-\r
-               String shortDisplayName = personInfo.get(PersonJAXBSchema.SHORT_DISPLAY_NAME);\r
-               person.setShortDisplayName(shortDisplayName);\r
-       if (shortDisplayNameComputed == false && shortDisplayName == null) {\r
-               throw new IllegalArgumentException("shortDisplayName cannot be null when shortDisplayComputed is 'false'");\r
-       }       \r
-\r
-       //String refName = createPersonRefName(personAuthRefName, shortId, displayName);\r
-               //person.setRefName(refName);\r
        \r
        String value;\r
         List<String> values = null;\r
-        if((value = (String)personInfo.get(PersonJAXBSchema.FORE_NAME))!=null) //FIXME: REM - I don't think we need to check for null -null is a valid value and won't cause any problems. \r
-               person.setForeName(value);\r
-        if((value = (String)personInfo.get(PersonJAXBSchema.MIDDLE_NAME))!=null)\r
-               person.setMiddleName(value);\r
-        if((value = (String)personInfo.get(PersonJAXBSchema.SUR_NAME))!=null)\r
-               person.setSurName(value);\r
-        if((value = (String)personInfo.get(PersonJAXBSchema.INITIALS))!=null)\r
-               person.setInitials(value);\r
-        if((value = (String)personInfo.get(PersonJAXBSchema.SALUTATIONS))!=null)\r
-               person.setSalutation(value);\r
-        if((value = (String)personInfo.get(PersonJAXBSchema.TITLE))!=null)\r
-               person.setTitle(value);\r
-        if((value = (String)personInfo.get(PersonJAXBSchema.NAME_ADDITIONS))!=null)\r
-               person.setNameAdditions(value);\r
+\r
         if((value = (String)personInfo.get(PersonJAXBSchema.BIRTH_DATE))!=null)\r
                person.setBirthDate(value);\r
         if((value = (String)personInfo.get(PersonJAXBSchema.DEATH_DATE))!=null)\r
@@ -260,6 +218,11 @@ public class PersonAuthorityClientUtils {
         if((value = (String)personInfo.get(PersonJAXBSchema.NAME_NOTE))!=null)\r
                person.setNameNote(value);\r
         \r
+        // Set values in the Term Information Group\r
+        PersonTermGroupList termList = person.getPersonTermGroupList();\r
+        List<PersonTermGroup> existingTerms = termList.getPersonTermGroup();\r
+        existingTerms = terms;\r
+        \r
         if (personRepeatablesInfo != null) {\r
             if((values = (List<String>)personRepeatablesInfo.get(PersonJAXBSchema.GROUPS))!=null) {\r
                     GroupList groupsList = new GroupList();\r
@@ -285,7 +248,7 @@ public class PersonAuthorityClientUtils {
                     List<String> schoolsOrStyles = schoolOrStyleList.getSchoolOrStyle();\r
                     schoolsOrStyles.addAll(values);\r
                     person.setSchoolsOrStyles(schoolOrStyleList);\r
-            }\r
+            }        \r
         }\r
 \r
         \r
@@ -312,51 +275,25 @@ public class PersonAuthorityClientUtils {
      */\r
     public static String createItemInAuthority(String vcsid, \r
                String personAuthorityRefName, Map<String,String> personMap,\r
-               Map<String, List<String>> personRepeatablesMap, PersonAuthorityClient client ) {\r
+                List<PersonTermGroup> terms, Map<String, List<String>> personRepeatablesMap,\r
+                PersonAuthorityClient client ) {\r
        // Expected status code: 201 Created\r
        int EXPECTED_STATUS_CODE = Response.Status.CREATED.getStatusCode();\r
        // Type of service request being tested\r
        ServiceRequestType REQUEST_TYPE = ServiceRequestType.CREATE;\r
-       \r
-       String displayName = personMap.get(PersonJAXBSchema.DISPLAY_NAME);\r
-       String displayNameComputedStr = personMap.get(PersonJAXBSchema.DISPLAY_NAME_COMPUTED);\r
-       boolean displayNameComputed = (displayNameComputedStr==null) || displayNameComputedStr.equalsIgnoreCase("true");\r
-       if( displayName == null ) {\r
-               if(!displayNameComputed) {\r
-                       throw new RuntimeException(\r
-                       "CreateItem: Must supply a displayName if displayNameComputed is set to false.");\r
-               }\r
-               displayName = \r
-                       prepareDefaultDisplayName(\r
-                       personMap.get(PersonJAXBSchema.FORE_NAME),\r
-                       personMap.get(PersonJAXBSchema.MIDDLE_NAME),\r
-                       personMap.get(PersonJAXBSchema.SUR_NAME),\r
-                       personMap.get(PersonJAXBSchema.BIRTH_DATE),\r
-                       personMap.get(PersonJAXBSchema.DEATH_DATE));\r
-               personMap.put(PersonJAXBSchema.DISPLAY_NAME, displayName);\r
-       }\r
-       String shortDisplayName = personMap.get(PersonJAXBSchema.SHORT_DISPLAY_NAME);\r
-       String shortDisplayNameComputedStr = personMap.get(PersonJAXBSchema.SHORT_DISPLAY_NAME_COMPUTED);\r
-       boolean shortDisplayNameComputed = (shortDisplayNameComputedStr==null) || shortDisplayNameComputedStr.equalsIgnoreCase("true");\r
-       if( shortDisplayName == null ) {\r
-               if(!shortDisplayNameComputed) {\r
-                       throw new RuntimeException(\r
-                       "CreateItem: Must supply a shortDisplayName if shortDisplayNameComputed is set to false.");\r
-               }\r
-               shortDisplayName = \r
-                       prepareDefaultDisplayName(\r
-                       personMap.get(PersonJAXBSchema.FORE_NAME), null,\r
-                       personMap.get(PersonJAXBSchema.SUR_NAME),null,null);\r
-               personMap.put(PersonJAXBSchema.SHORT_DISPLAY_NAME, shortDisplayName);\r
-       }\r
+        \r
+        String displayName = "";\r
+        if (terms !=null && terms.size() > 0) {\r
+            displayName = terms.get(0).getDisplayName();\r
+        }\r
        \r
        if(logger.isDebugEnabled()){\r
-               logger.debug("Import: Create Item: \"" + displayName\r
-                               +"\" in personAuthorityulary: \"" + vcsid +"\"");\r
+               logger.debug("Creating item with display name: \"" + displayName\r
+                               +"\" in personAuthority: \"" + vcsid +"\"");\r
        }\r
        PoxPayloadOut multipart = \r
                createPersonInstance(vcsid, null /*personAuthorityRefName*/,\r
-                       personMap, personRepeatablesMap, client.getItemCommonPartName());\r
+                       personMap, terms, personRepeatablesMap, client.getItemCommonPartName());\r
        \r
        String result = null;\r
        ClientResponse<Response> res = client.createItem(vcsid, multipart);\r
index 226cf33ac93e160dff8c58be3112e765ca9fe891..675d303eafc9f47160f4073aef2350223668b0cc 100644 (file)
@@ -36,6 +36,7 @@ import org.collectionspace.services.client.PersonAuthorityClient;
 import org.collectionspace.services.client.PersonAuthorityClientUtils;
 import org.collectionspace.services.client.PoxPayloadOut;
 import org.collectionspace.services.jaxb.AbstractCommonList;
+import org.collectionspace.services.person.PersonTermGroup;
 import org.jboss.resteasy.client.ClientResponse;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -602,16 +603,20 @@ public class PersonAuthoritySearchTest extends BaseServiceTest<AbstractCommonLis
         PersonAuthorityClient client = new PersonAuthorityClient();
         Map<String, String> partialTermPersonMap = new HashMap<String,String>();
         //
-        // Fill the property map for the UNICODE item
+        // Fill values for the UNICODE item
         //
         partialTermPersonMap.put(PersonJAXBSchema.SHORT_IDENTIFIER, TEST_SHORT_ID_UNICODE );
-        partialTermPersonMap.put(PersonJAXBSchema.DISPLAY_NAME_COMPUTED, "false");
-        partialTermPersonMap.put(PersonJAXBSchema.DISPLAY_NAME, TEST_PARTIAL_TERM_DISPLAY_NAME_UNICODE);
-        partialTermPersonMap.put(PersonJAXBSchema.FORE_NAME, TEST_PARTIAL_TERM_FORE_NAME);
-        partialTermPersonMap.put(PersonJAXBSchema.SUR_NAME, TEST_PARTIAL_TERM_SUR_NAME_UNICODE);
         partialTermPersonMap.put(PersonJAXBSchema.BIRTH_PLACE, TEST_KWD_BIRTH_PLACE);
         partialTermPersonMap.put(PersonJAXBSchema.GENDER, "male");
         partialTermPersonMap.put(PersonJAXBSchema.BIO_NOTE, TEST_KWD_BIO_NOTE_NO_QUOTES);
+        
+        List<PersonTermGroup> partialTerms = new ArrayList<PersonTermGroup>();
+        PersonTermGroup term = new PersonTermGroup();
+        term.setDisplayName(TEST_PARTIAL_TERM_DISPLAY_NAME_UNICODE);
+        term.setTerm(TEST_PARTIAL_TERM_DISPLAY_NAME_UNICODE);
+        term.setForeName(TEST_PARTIAL_TERM_FORE_NAME);
+        term.setSurName(TEST_PARTIAL_TERM_SUR_NAME_UNICODE);
+        partialTerms.add(term);
 
         Map<String, List<String>> partialTermRepeatablesMap = new HashMap<String, List<String>>();
         ArrayList<String> styles = new ArrayList<String>();
@@ -619,17 +624,18 @@ public class PersonAuthoritySearchTest extends BaseServiceTest<AbstractCommonLis
         partialTermRepeatablesMap.put(PersonJAXBSchema.SCHOOLS_OR_STYLES, styles);
 
         createItem(testName, authorityCsid, null /*authRefName*/, client, 
-                partialTermPersonMap, partialTermRepeatablesMap);
+                partialTermPersonMap, partialTerms, partialTermRepeatablesMap);
         //
-        // Adjust the property map for the QUOTE item
+        // Adjust values for the QUOTE item
         //
         partialTermPersonMap.put(PersonJAXBSchema.SHORT_IDENTIFIER, TEST_SHORT_ID_QUOTE );
-        partialTermPersonMap.put(PersonJAXBSchema.DISPLAY_NAME, TEST_PARTIAL_TERM_DISPLAY_NAME_QUOTE);
-        partialTermPersonMap.put(PersonJAXBSchema.SUR_NAME, TEST_PARTIAL_TERM_SUR_NAME_QUOTE);
         partialTermPersonMap.put(PersonJAXBSchema.BIO_NOTE, TEST_KWD_BIO_NOTE_DBL_QUOTES);
+        
+        partialTerms.get(0).setDisplayName(TEST_PARTIAL_TERM_DISPLAY_NAME_QUOTE);
+        partialTerms.get(0).setSurName(TEST_PARTIAL_TERM_SUR_NAME_QUOTE);
 
         createItem(testName, authorityCsid, null /*authRefName*/, client, 
-                partialTermPersonMap, partialTermRepeatablesMap);
+                partialTermPersonMap, partialTerms, partialTermRepeatablesMap);
     }
     
     private void createItem(
@@ -638,10 +644,11 @@ public class PersonAuthoritySearchTest extends BaseServiceTest<AbstractCommonLis
                String authRefName,
                PersonAuthorityClient client,
                Map<String, String> partialTermPersonMap,
+                List<PersonTermGroup> partialTerms,
                Map<String, List<String>> partialTermRepeatablesMap) throws Exception {
         PoxPayloadOut multipart =
             PersonAuthorityClientUtils.createPersonInstance(authorityCsid, null, //authRefName, 
-                partialTermPersonMap, partialTermRepeatablesMap, client.getItemCommonPartName() );
+                partialTermPersonMap, partialTerms, partialTermRepeatablesMap, client.getItemCommonPartName() );
 
         String newID = null;
         ClientResponse<Response> res = client.createItem(authorityCsid, multipart);
index 0e6ed24524eb6e8d0c7ef72ad7c6bc54850dd473..d475409d963e0c32bf08cd3bfee76c766e27e268 100644 (file)
@@ -34,6 +34,7 @@ import org.collectionspace.services.client.PersonAuthorityClient;
 import org.collectionspace.services.client.PersonAuthorityClientUtils;
 import org.collectionspace.services.client.PoxPayloadOut;
 import org.collectionspace.services.jaxb.AbstractCommonList;
+import org.collectionspace.services.person.PersonTermGroup;
 
 import org.jboss.resteasy.client.ClientResponse;
 import org.slf4j.Logger;
@@ -203,13 +204,19 @@ public class PersonAuthorityServicePerfTest extends BaseServiceTest<AbstractComm
         //
         String shortId = firstName+lastName;
         personMap.put(PersonJAXBSchema.SHORT_IDENTIFIER, shortId );
-        personMap.put(PersonJAXBSchema.DISPLAY_NAME_COMPUTED, "true");
-        personMap.put(PersonJAXBSchema.FORE_NAME, firstName);
-        personMap.put(PersonJAXBSchema.SUR_NAME, lastName);
+        
+        List<PersonTermGroup> terms = new ArrayList<PersonTermGroup>();
+        PersonTermGroup term = new PersonTermGroup();
+        term.setDisplayName(firstName + " " + lastName);
+        term.setTerm(firstName + " " + lastName);
+        term.setForeName(firstName);
+        term.setSurName(lastName);
+        terms.add(term);
+        
         Map<String, List<String>> personRepeatablesMap = new HashMap<String, List<String>>();
         PoxPayloadOut multipart =
             PersonAuthorityClientUtils.createPersonInstance(authId, null, //authRefName, 
-                       personMap, personRepeatablesMap, client.getItemCommonPartName() );
+                       personMap, terms, personRepeatablesMap, client.getItemCommonPartName() );
 
         String newID = null;
         ClientResponse<Response> res = client.createItem(authId, multipart);
index 61dcc1f28c756c1b166f1bf368b50dc32b8fa703..32cb21cc7708dfb3c961ac20b656dc86c3b49432 100644 (file)
@@ -46,6 +46,8 @@ 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.PersonTermGroup;
+import org.collectionspace.services.person.PersonTermGroupList;
 import org.collectionspace.services.person.PersonsCommon;
 
 import org.jboss.resteasy.client.ClientResponse;
@@ -183,15 +185,18 @@ public class PersonAuthorityServiceTest extends AbstractAuthorityServiceTest<Per
     @Override
     protected PoxPayloadOut createItemInstance(String parentCsid, String identifier) {
         String headerLabel = new PersonAuthorityClient().getItemCommonPartName();
+        
         HashMap<String, String> personInfo = new HashMap<String, String>();
         String shortId = "johnWayneTempActor";
-        personInfo.put(PersonJAXBSchema.DISPLAY_NAME_COMPUTED, "false");
-        personInfo.put(PersonJAXBSchema.DISPLAY_NAME, "John Wayne Temp");
-        personInfo.put(PersonJAXBSchema.SHORT_DISPLAY_NAME_COMPUTED, "false");
-        personInfo.put(PersonJAXBSchema.SHORT_DISPLAY_NAME, "JohnWayneTemp");
         personInfo.put(PersonJAXBSchema.SHORT_IDENTIFIER, shortId);
-
-        return PersonAuthorityClientUtils.createPersonInstance(parentCsid, identifier, personInfo, headerLabel);
+        
+        List<PersonTermGroup> terms = new ArrayList<PersonTermGroup>();
+        PersonTermGroup term = new PersonTermGroup();
+        term.setDisplayName("John Wayne Temp");
+        term.setTerm("JohnWayneTemp");
+        terms.add(term);
+        
+        return PersonAuthorityClientUtils.createPersonInstance(parentCsid, identifier, personInfo, terms, headerLabel);
     }
 
     /**
@@ -214,14 +219,7 @@ public class PersonAuthorityServiceTest extends AbstractAuthorityServiceTest<Per
         // Fill the property map
         //
         String shortId = "johnWayneActor";
-        johnWayneMap.put(PersonJAXBSchema.DISPLAY_NAME_COMPUTED, "false");
-        johnWayneMap.put(PersonJAXBSchema.DISPLAY_NAME, "John Wayne");
-        johnWayneMap.put(PersonJAXBSchema.SHORT_DISPLAY_NAME_COMPUTED, "false");
-        johnWayneMap.put(PersonJAXBSchema.SHORT_DISPLAY_NAME, "JohnWayne");
         johnWayneMap.put(PersonJAXBSchema.SHORT_IDENTIFIER, shortId);
-
-        johnWayneMap.put(PersonJAXBSchema.FORE_NAME, TEST_FORE_NAME);
-        johnWayneMap.put(PersonJAXBSchema.SUR_NAME, TEST_SUR_NAME);
         johnWayneMap.put(PersonJAXBSchema.GENDER, "male");
         johnWayneMap.put(PersonJAXBSchema.BIRTH_DATE, TEST_BIRTH_DATE);
         johnWayneMap.put(PersonJAXBSchema.BIRTH_PLACE, "Winterset, Iowa");
@@ -233,13 +231,21 @@ public class PersonAuthorityServiceTest extends AbstractAuthorityServiceTest<Per
                 + "He was also known for his conservative political views and his support in "
                 + "the 1950s for anti-communist positions.");
 
+        List<PersonTermGroup> johnWayneTerms = new ArrayList<PersonTermGroup>();
+        PersonTermGroup term = new PersonTermGroup();
+        term.setDisplayName("John Wayne DisplayName");
+        term.setTerm("John Wayne");
+        term.setForeName(TEST_FORE_NAME);
+        term.setSurName(TEST_SUR_NAME);
+        johnWayneTerms.add(term);
+
         Map<String, List<String>> johnWayneRepeatablesMap = new HashMap<String, List<String>>();
         List<String> johnWayneGroups = new ArrayList<String>();
         johnWayneGroups.add("Irish");
         johnWayneGroups.add("Scottish");
         johnWayneRepeatablesMap.put(PersonJAXBSchema.GROUPS, johnWayneGroups);
 
-        return createItemInAuthority(vcsid, null /*authRefName*/, shortId, johnWayneMap, johnWayneRepeatablesMap);
+        return createItemInAuthority(vcsid, null /*authRefName*/, shortId, johnWayneMap, johnWayneTerms, johnWayneRepeatablesMap);
 
     }
 
@@ -253,7 +259,7 @@ public class PersonAuthorityServiceTest extends AbstractAuthorityServiceTest<Per
      * @return the string
      */
     private String createItemInAuthority(String vcsid, String authRefName, String shortId,
-            Map itemFieldProperties, Map itemRepeatableFieldProperties) {
+            Map itemFieldProperties, List<PersonTermGroup> terms, Map itemRepeatableFieldProperties) {
 
         final String testName = "createItemInAuthority";
         if (logger.isDebugEnabled()) {
@@ -264,7 +270,7 @@ public class PersonAuthorityServiceTest extends AbstractAuthorityServiceTest<Per
         PersonAuthorityClient client = new PersonAuthorityClient();
         PoxPayloadOut multipart =
                 PersonAuthorityClientUtils.createPersonInstance(vcsid, null /*authRefName*/, itemFieldProperties,
-                itemRepeatableFieldProperties, client.getItemCommonPartName());
+                terms, itemRepeatableFieldProperties, client.getItemCommonPartName());
         setupCreate();
         ClientResponse<Response> res = client.createItem(vcsid, multipart);
         String newID = null;
@@ -409,15 +415,18 @@ public class PersonAuthorityServiceTest extends AbstractAuthorityServiceTest<Per
         // Create the payload to be included in the body of the request
         String shortId = "7-Eleven";
         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");
-        fieldProperties.put(PersonJAXBSchema.SHORT_DISPLAY_NAME, shortId);
         fieldProperties.put(PersonJAXBSchema.SHORT_IDENTIFIER, shortId);
+        
+        List<PersonTermGroup> terms = new ArrayList<PersonTermGroup>();
+        PersonTermGroup term = new PersonTermGroup();
+        term.setDisplayName(shortId);
+        term.setTerm(shortId);
+        terms.add(term);
+        
         final Map NULL_REPEATABLE_FIELD_PROPERTIES = null;
         PoxPayloadOut multipart =
                 PersonAuthorityClientUtils.createPersonInstance(knownResourceId,
-                null /*knownResourceRefName*/, fieldProperties,
+                null /*knownResourceRefName*/, fieldProperties, terms,
                 NULL_REPEATABLE_FIELD_PROPERTIES, client.getItemCommonPartName());
 
         // Send the request and receive a response
@@ -617,135 +626,10 @@ public class PersonAuthorityServiceTest extends AbstractAuthorityServiceTest<Per
             }
         }
     }
-
-    /**
-     * Verify item display name.
-     *
-     * @param testName the test name
-     * @throws Exception the exception
-     */
-    @Test(dataProvider = "testName", groups = {"update"},
-               dependsOnMethods = {"org.collectionspace.services.client.test.AbstractAuthorityServiceTest.updateItem"})
-    public void verifyItemDisplayName(String testName) throws Exception {
-        // Perform setup.
-        setupUpdate();
-
-        // 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 {
-            assertStatusCode(res, testName);
-            // Check whether person has expected displayName.
-            input = new PoxPayloadIn(res.getEntity());
-        } finally {
-               if (res != null) {
-                res.releaseConnection();
-            }
-        }
-
-        PersonsCommon person = (PersonsCommon) extractPart(input,
-                client.getItemCommonPartName(), PersonsCommon.class);
-        Assert.assertNotNull(person);
-        // Check whether person has expected displayName.
-        // Make sure displayName matches computed form
-        String displayName = person.getDisplayName();
-        String expectedDisplayName =
-                PersonAuthorityClientUtils.prepareDefaultDisplayName(
-                TEST_FORE_NAME, null, TEST_SUR_NAME,
-                TEST_BIRTH_DATE, TEST_DEATH_DATE);
-        Assert.assertFalse(displayName.equals(expectedDisplayName));
-
-        // Make sure short displayName matches computed form
-        String shortDisplayName = person.getShortDisplayName();
-        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);
-
-        // Submit the updated resource to the service and store the response.
-        PoxPayloadOut output = new PoxPayloadOut(PersonAuthorityClient.SERVICE_ITEM_PAYLOAD_NAME);
-        PayloadOutputPart commonPart = output.addPart(client.getItemCommonPartName(), person);
-        res = client.updateItem(knownResourceId, knownItemResourceId, output);
-        try {
-            assertStatusCode(res, testName);
-            // Retrieve the updated resource and verify that its contents exist.
-            input = new PoxPayloadIn(res.getEntity());
-        } finally {
-               if (res != null) {
-                res.releaseConnection();
-            }
-        }
-
-        PersonsCommon updatedPerson =
-                (PersonsCommon) extractPart(input,
-                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.");
-        // Verify that the updated resource computes the right displayName.
-        Assert.assertEquals(updatedPerson.getDisplayName(), expectedDisplayName,
-                "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.");
-
-        // Now Update the displayName, not computed and verify the computed name is overriden.
-        person.setDisplayNameComputed(false);
-        expectedDisplayName = "TestName";
-        person.setDisplayName(expectedDisplayName);
-        person.setShortDisplayNameComputed(false);
-        person.setShortDisplayName(expectedDisplayName);
-
-        // Submit the updated resource to the service and store the response.
-        output = new PoxPayloadOut(PersonAuthorityClient.SERVICE_ITEM_PAYLOAD_NAME);
-        commonPart = output.addPart(client.getItemCommonPartName(), person);
-        res = client.updateItem(knownResourceId, knownItemResourceId, output);
-        try {
-            assertStatusCode(res, testName);
-            // Retrieve the updated resource and verify that its contents exist.
-            input = new PoxPayloadIn(res.getEntity());
-        } finally {
-               if (res != null) {
-                res.releaseConnection();
-            }
-        }
-
-        updatedPerson =
-                (PersonsCommon) extractPart(input,
-                client.getItemCommonPartName(), PersonsCommon.class);
-        Assert.assertNotNull(updatedPerson);
-
-        // Verify that the updated resource received the correct data.
-        Assert.assertEquals(updatedPerson.isDisplayNameComputed(), false,
-                "Updated displayNameComputed in Person did not match submitted data.");
-        // Verify that the updated resource computes the right displayName.
-        Assert.assertEquals(updatedPerson.getDisplayName(),
-                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,
-                "Updated ShortDisplayName (not computed) in Person not stored.");
-    }
+    
+    // FIXME: This test depends on server-side validation logic to require
+    // a non-null (and potentially, non-empty) displayname for each term,
+    // and will fail if that validation is not present.
 
     /**
      * Verify illegal item display name.
@@ -753,8 +637,7 @@ public class PersonAuthorityServiceTest extends AbstractAuthorityServiceTest<Per
      * @param testName the test name
      * @throws Exception the exception
      */
-    @Test(dataProvider = "testName", groups = {"update"},
-               dependsOnMethods = {"verifyItemDisplayName"})
+    @Test(dataProvider = "testName", groups = {"update"})
     public void verifyIllegalItemDisplayName(String testName) throws Exception {
         // Perform setup for read.
         setupRead();
@@ -772,15 +655,25 @@ public class PersonAuthorityServiceTest extends AbstractAuthorityServiceTest<Per
             }
         }
         //
-        // Make an invalid UPDATE request -i.e., if we don't want the display name computed, then
-        // we need to supply one.
+        // Make an invalid UPDATE request, without a display name
         //
         PersonsCommon person = (PersonsCommon) extractPart(input,
                 client.getItemCommonPartName(), PersonsCommon.class);
         Assert.assertNotNull(person);
-        // Try to Update with computed false and no displayName
-        person.setDisplayNameComputed(false);
-        person.setDisplayName(null);
+        // Try to Update with no displayName
+        List<PersonTermGroup> johnWayneTerms = new ArrayList<PersonTermGroup>();
+        PersonTermGroup term = new PersonTermGroup();
+        term.setDisplayName("John Wayne DisplayName");
+        term.setTerm("John Wayne");
+        term.setForeName(TEST_FORE_NAME);
+        term.setSurName(TEST_SUR_NAME);
+        johnWayneTerms.add(term);
+        
+        PersonTermGroupList termList = person.getPersonTermGroupList();
+        Assert.assertNotNull(termList);
+        List<PersonTermGroup> terms = termList.getPersonTermGroup();
+        Assert.assertNotNull(terms);
+        terms.get(0).setDisplayName(null);
 
         // Submit the updated resource to the service and store the response.
         PoxPayloadOut output = new PoxPayloadOut(PersonAuthorityClient.SERVICE_ITEM_PAYLOAD_NAME);
@@ -1105,7 +998,12 @@ public class PersonAuthorityServiceTest extends AbstractAuthorityServiceTest<Per
 
         // Update the contents of this resource.
         person.setCsid(null);
-        person.setForeName("updated-" + person.getForeName());
+        PersonTermGroupList termList = person.getPersonTermGroupList();
+        Assert.assertNotNull(termList);
+        List<PersonTermGroup> terms = termList.getPersonTermGroup();
+        Assert.assertNotNull(terms);
+        String foreName = terms.get(0).getForeName();
+        terms.get(0).setForeName("updated-" + foreName);
         if (logger.isDebugEnabled()) {
             logger.debug("to be updated Person");
             logger.debug(objectAsXmlString(person,
@@ -1138,8 +1036,12 @@ public class PersonAuthorityServiceTest extends AbstractAuthorityServiceTest<Per
         }
 
         // Verify that the updated resource received the correct data.
-        Assert.assertEquals(updatedPerson.getForeName(),
-                person.getForeName(),
+        PersonTermGroupList updatedTermList = person.getPersonTermGroupList();
+        Assert.assertNotNull(updatedTermList);
+        List<PersonTermGroup> updatedTerms = termList.getPersonTermGroup();
+        Assert.assertNotNull(updatedTerms);
+        String updatedForeName = updatedTerms.get(0).getForeName();
+        Assert.assertEquals(updatedForeName, foreName,
                 "Data in updated Person did not match submitted data.");
     }
 
@@ -1518,14 +1420,19 @@ public class PersonAuthorityServiceTest extends AbstractAuthorityServiceTest<Per
     protected PoxPayloadOut createNonExistenceItemInstance(String commonPartName, String identifier) {
         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");
+        
+        List<PersonTermGroup> terms = new ArrayList<PersonTermGroup>();
+        PersonTermGroup term = new PersonTermGroup();
+        term.setForeName("John");
+        term.setSurName("Wayne");
+        terms.add(term);
+        
         Map<String, List<String>> nonexRepeatablesMap = new HashMap<String, List<String>>();
         PoxPayloadOut result =
                 PersonAuthorityClientUtils.createPersonInstance(NON_EXISTENT_ID,
                 null, //PersonAuthorityClientUtils.createPersonAuthRefName(NON_EXISTENT_ID, null),
-                nonexMap, nonexRepeatablesMap, commonPartName);
+                nonexMap, terms, nonexRepeatablesMap, commonPartName);
         return result;
     }