XdsbErrorFactory { public RetrieveDocumentSetResponse errorRetrieveDocumentSetResponseNotExistsOrAccessible( RetrieveDocumentSetRequest input) { List<String> list = new LinkedList<String>(); for (DocumentRequest req : input.getDocumentRequest()) { StringBuilder builder = new StringBuilder(); builder.append(req.getDocumentUniqueId()); builder.append(":"); builder.append(req.getRepositoryUniqueId()); list.add(builder.toString()); } StringBuilder builder = new StringBuilder(); builder.append("The document(s) "); builder.append(list.toString()); builder.append(" does/do not exist or access denied by Policy Enforcement Point."); String codeContext = builder.toString(); String errorCode = "XDSRepositoryError"; boolean isPartial = false; return createRetrieveDocumentSetResponseError(codeContext, errorCode, isPartial); } XdsbErrorFactory();  XdsbErrorFactory(RegistryErrorListSetter registryErrorListSetter); RetrieveDocumentSetResponse setRetrieveDocumentSetResponseRegistryErrorListFilteredByPatientAndAuthor(
			RetrieveDocumentSetResponse response, int numRemoved,
			String patientId, String authorNPI); RetrieveDocumentSetResponse errorRetrieveDocumentSetResponseMultipleRepositoryId(); RetrieveDocumentSetResponse errorRetrieveDocumentSetResponseConstructByErrorMessage(
			String errorMessage); RetrieveDocumentSetResponse errorRetrieveDocumentSetInternalServerError(); RetrieveDocumentSetResponse noClinicalDocumentFound(
			String patientId, String authorNPI); RetrieveDocumentSetResponse errorRetrieveDocumentSetResponseSchemaValidation(
			RetrieveDocumentSetResponse response, Map<String, String> errorMap); RetrieveDocumentSetResponse errorRetrieveDocumentSetResponseNotExistsOrAccessible(
			RetrieveDocumentSetRequest input); RetrieveDocumentSetResponse errorRetrieveDocumentSetResponseRepositoryNotAvailable(); RetrieveDocumentSetResponse errorRetrieveDocumentSetResponseInternalPEPError(); RetrieveDocumentSetResponse errorRetrieveDocumentSetResponseAccessDeniedByPDP(); RetrieveDocumentSetResponse errorRetrieveDocumentSetResponseNoConsentsFound(
			String patientUniqueId); AdhocQueryResponse errorAdhocQueryResponseConstructByErrorMessage(
			String errorMessage); AdhocQueryResponse errorAdhocQueryResponseRegistryNotAvailable(); AdhocQueryResponse errorAdhocQueryResponseAccessDeniedByPDP(); AdhocQueryResponse errorAdhocQueryResponseInternalServerError(); AdhocQueryResponse errorAdhocQueryResponseNoDocumentsFound(
			String patientUniqueId, String intermediarySubjectNPI); AdhocQueryResponse errorAdhocQueryResponseMissingParameters();  }
@Test public void testErrorRetrieveDocumentSetResponseNotExistsOrAccessible() throws SAXException, IOException, Throwable { String expectedResponse = fileReader .readFile("errorRetrieveDocumentSetResponseNotExistsOrAccessible.xml"); RetrieveDocumentSetRequest input = new RetrieveDocumentSetRequest(); DocumentRequest doc1 = new DocumentRequest(); doc1.setDocumentUniqueId("DocumentUniqueId1"); doc1.setRepositoryUniqueId("RepositoryUniqueId1"); DocumentRequest doc2 = new DocumentRequest(); doc2.setDocumentUniqueId("DocumentUniqueId2"); doc2.setRepositoryUniqueId("RepositoryUniqueId2"); input.getDocumentRequest().add(doc1); input.getDocumentRequest().add(doc2); RetrieveDocumentSetResponse actualResponse = sut .errorRetrieveDocumentSetResponseNotExistsOrAccessible(input); assertResponse(expectedResponse, actualResponse); }