Buggy code:
@ Component ( "orcidT2ServiceDelegator" ) public class MemberV2ApiServiceDelegatorImpl implements MemberV2ApiServiceDelegator { @ Resource private ProfileWorkManager profileWorkManager ; @ Resource private ProfileFundingManager profileFundingManager ; @ Resource private ClientDetailsManager clientDetailsManager ; @ Resource private ProfileEntityManager profileEntityManager ; @ Resource private AffiliationsManager affiliationsManager ; @ Resource private WebhookDao webhookDao ; @ Resource private ProfileDao profileDao ; @ Resource private SourceManager sourceManager ; @ Resource private OrcidSecurityManager orcidSecurityManager ; @ Override public Response viewStatusText ( ) { } @ Override @ AccessControl ( requiredScope = ScopePathType . ACTIVITIES_READ_LIMITED ) public Response viewActivities ( String orcid ) { profileEntityManager . findByOrcid ( orcid ) ; ActivitiesSummary as = new ActivitiesSummary ( ) ; Work w = new Work ( ) ; WorkTitle wt = new WorkTitle ( ) ; wt . setTitle ( new Title ( "Test" ) ) ; w . setWorkTitle ( wt ) ; List < Work > works = new ArrayList < Work > ( ) ; works . add ( w ) ; <START_BUG> as . setWorks ( works ) ; <END_BUG> return Response . ok ( as ) . build ( ) ; } @ Override @ AccessControl ( requiredScope = ScopePathType . ACTIVITIES_READ_LIMITED ) public Response viewWork ( String orcid , String putCode ) { } @ Override @ AccessControl ( requiredScope = ScopePathType . ACTIVITIES_UPDATE ) public Response createWork ( String orcid , Work work ) { } @ Override @ AccessControl ( requiredScope = ScopePathType . ACTIVITIES_UPDATE ) public Response updateWork ( String orcid , String putCode , Work work ) { } @ Override @ AccessControl ( requiredScope = ScopePathType . ACTIVITIES_UPDATE ) public Response deleteWork ( String orcid , String putCode ) { } @ Override @ AccessControl ( requiredScope = ScopePathType . ACTIVITIES_READ_LIMITED ) public Response viewFunding ( String orcid , String putCode ) { } @ Override @ AccessControl ( requiredScope = ScopePathType . ACTIVITIES_READ_LIMITED ) public Response viewFundingSummary ( String orcid , String putCode ) { } @ Override @ AccessControl ( requiredScope = ScopePathType . ACTIVITIES_UPDATE ) public Response createFunding ( String orcid , Funding funding ) { } @ Override @ AccessControl ( requiredScope = ScopePathType . ACTIVITIES_UPDATE ) public Response updateFunding ( String orcid , String putCode , Funding funding ) { } @ Override @ AccessControl ( requiredScope = ScopePathType . ACTIVITIES_READ_LIMITED ) public Response viewEducation ( String orcid , String putCode ) { } @ Override @ AccessControl ( requiredScope = ScopePathType . ACTIVITIES_READ_LIMITED ) public Response viewEducationSummary ( String orcid , String putCode ) { } @ Override @ AccessControl ( requiredScope = ScopePathType . ACTIVITIES_UPDATE ) public Response createEducation ( String orcid , Education education ) { } @ Override @ AccessControl ( requiredScope = ScopePathType . ACTIVITIES_UPDATE ) public Response updateEducation ( String orcid , String putCode , Education education ) { } @ Override @ AccessControl ( requiredScope = ScopePathType . ACTIVITIES_READ_LIMITED ) public Response viewEmployment ( String orcid , String putCode ) { } @ AccessControl ( requiredScope = ScopePathType . ACTIVITIES_READ_LIMITED ) public Response viewEmploymentSummary ( String orcid , String putCode ) { } @ Override @ AccessControl ( requiredScope = ScopePathType . ACTIVITIES_UPDATE ) public Response createEmployment ( String orcid , Employment employment ) { } @ Override @ AccessControl ( requiredScope = ScopePathType . ACTIVITIES_UPDATE ) public Response updateEmployment ( String orcid , String putCode , Employment employment ) { } @ Override @ AccessControl ( requiredScope = ScopePathType . ACTIVITIES_UPDATE ) public Response deleteAffiliation ( String orcid , String putCode ) { } @ Override @ AccessControl ( requiredScope = ScopePathType . ACTIVITIES_UPDATE ) public Response deleteFunding ( String orcid , String putCode ) { } }

Fix:
as . getWorks ( ) . addAll ( works ) ;