RegistrationRequestProcessing { public RegistrationResponse processRequest(RegistrationRequest regRequest) { RegistrationResponse response = new RegistrationResponse(); Gson gson = new Gson(); int[] errCodes = validate(regRequest); if (errCodes != null) { return setValidationError(response, errCodes); } setAppId(regRequest, response); response.header = new OperationHeader(); response.header.serverData = regRequest.header.serverData; response.header.op = regRequest.header.op; response.header.upv = regRequest.header.upv; FinalChallengeParams fcParams = new FinalChallengeParams(); fcParams.appID = regRequest.header.appID; fcParams.facetID = Constants.FACET_ID; fcParams.challenge = regRequest.challenge; response.fcParams = Base64.encodeBase64URLSafeString(gson.toJson( fcParams).getBytes()); setAssertions(response); return response; } RegistrationRequestProcessing();  RegistrationRequestProcessing(String assertion); RegistrationResponse processRequest(RegistrationRequest regRequest);  }
@Test public void testProcessRequest() { RegistrationRequestProcessing r = new RegistrationRequestProcessing(); RegistrationRequest req = getTestRequest(); assertNotNull(req); logger.info(gson.toJson(req)); RegistrationResponse resp= r.processRequest(req); assertNotNull(resp); logger.info(gson.toJson(resp)); }