RegistryErrorListSetterImpl implements RegistryErrorListSetter { @Override public void setRegistryErrorList(RetrieveDocumentSetResponse response, RegistryErrorList registryErrorList, boolean isPartial) { RegistryResponse errorResponse = new RegistryResponse(); response.setRegistryResponse(errorResponse); if (isPartial) { errorResponse .setStatus("urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:PartialSuccess"); } else { errorResponse .setStatus("urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:Failure"); } errorResponse.setRegistryErrorList(registryErrorList); }  @Override void setRegistryErrorList(RetrieveDocumentSetResponse response,
			RegistryErrorList registryErrorList, boolean isPartial);  }
@Test public void testSetRegistryErrorList_PartialSuccess() { RetrieveDocumentSetResponse retrieveDocumentSetResponseMock = new RetrieveDocumentSetResponse(); RegistryErrorList registryErrorListMock = new RegistryErrorList(); boolean isPartial = true; sut.setRegistryErrorList(retrieveDocumentSetResponseMock, registryErrorListMock, isPartial); assertEquals(registryErrorListMock, retrieveDocumentSetResponseMock.getRegistryResponse().getRegistryErrorList()); assertEquals(URN_PARTIAL_SUCCESS, retrieveDocumentSetResponseMock.getRegistryResponse().getStatus()); }
@Test public void testSetRegistryErrorList_Failure() { RetrieveDocumentSetResponse retrieveDocumentSetResponseMock = new RetrieveDocumentSetResponse(); RegistryErrorList registryErrorListMock = new RegistryErrorList(); boolean isPartial = false; sut.setRegistryErrorList(retrieveDocumentSetResponseMock, registryErrorListMock, isPartial); assertEquals(registryErrorListMock, retrieveDocumentSetResponseMock.getRegistryResponse().getRegistryErrorList()); assertEquals(URN_FAILURE, retrieveDocumentSetResponseMock.getRegistryResponse().getStatus()); }