RegistrationRequestGeneration { public RegistrationRequest createRegistrationRequest(String username, Notary notary) { String challenge = generateChallenge(); String serverDataString = generateServerData(username, challenge, notary); return createRegistrationRequest(username, serverDataString, challenge); } RegistrationRequestGeneration();  RegistrationRequestGeneration(String appId);  RegistrationRequestGeneration(String appId, String[] acceptedAaids); Policy constructAuthenticationPolicy(); RegistrationRequest createRegistrationRequest(String username,
			Notary notary); static final String APP_ID; }
@Test public void notNull() { RegistrationRequest regReq = new RegistrationRequestGeneration().createRegistrationRequest("Username", new NotaryImpl()); assertNotNull(regReq); logger.info(gson.toJson(regReq)); }
@Test public void basic() { Notary notary = new NotaryImpl(); RegistrationRequest regReq = new RegistrationRequestGeneration().createRegistrationRequest("Username", notary); String serverData = regReq.header.serverData; serverData = new String (Base64.decode(serverData)); assertTrue(notary.verify(serverData,serverData)); assertTrue(RegistrationRequestGeneration.APP_ID.equals(regReq.header.appID)); logger.info(gson.toJson(regReq)); }