RegistrationRequestProcessor { public RegistrationResponse processRequest(RegistrationRequest regRequest, OperationalParamsIntf operationalParams, String appFacetId) throws Exception { RegistrationResponse response = new RegistrationResponse(); RegAssertionBuilder builder = new RegAssertionBuilder(operationalParams); Gson gson = new GsonBuilder().create(); response.header = new OperationHeader(); response.header.serverData = regRequest.header.serverData; response.header.appID = regRequest.header.appID; response.header.op = regRequest.header.op; response.header.upv = regRequest.header.upv; FinalChallengeParams fcParams = new FinalChallengeParams(); fcParams.appID = regRequest.header.appID; fcParams.facetID = operationalParams.getFacetId(fcParams.appID); fcParams.challenge = regRequest.challenge; response.fcParams = Base64.encodeToString(gson.toJson(fcParams) .getBytes(), Base64.URL_SAFE); setAssertions(response, builder, appFacetId); return response; }  RegistrationResponse processRequest(RegistrationRequest regRequest,
                                               OperationalParamsIntf operationalParams, String appFacetId);  }
@Test public void testProcessRequest() throws Exception { RegistrationRequestProcessor r = new RegistrationRequestProcessor(); RegistrationRequest req = getTestRequest(); assertNotNull(req); logger.info(gson.toJson(req)); RegistrationResponse resp= r.processRequest(req, operParams,""); assertNotNull(resp); logger.info(gson.toJson(resp)); }