OutboundDocRetrieveDelegate implements OutboundDelegate { protected void createErrorResponse(OutboundDocRetrieveOrchestratable message, String errorCode) { if (message == null) { LOG.debug("NhinOrchestratable was null"); return; } RetrieveDocumentSetResponseType response = MessageGenerator.getInstance() .createRegistryResponseError(errorCode); message.setResponse(response); }  @Override Orchestratable process(Orchestratable message); @Override OutboundOrchestratable process(OutboundOrchestratable message); OutboundOrchestratable process(OutboundDocRetrieveOrchestratable message); @Override void createErrorResponse(OutboundOrchestratable message, String error);  }
@Test public void testCreateErrorResponse() { OutboundDocRetrieveOrchestratable message = null; String errorCode = "XDSDocumentUniqueIdError"; OutboundDocRetrieveDelegate instance = new OutboundDocRetrieveDelegate(); instance.createErrorResponse(message, errorCode); assertNull(message); message = new OutboundStandardDocRetrieveOrchestratable(null, instance, null, null, null, null); instance.createErrorResponse(message, errorCode); assertEquals(message.getResponse().getRegistryResponse().getStatus(), "urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:Failure"); }