Oadr20bVENEiRegisterPartyService { public OadrCanceledPartyRegistrationType oadrCancelPartyRegistration(VtnSessionConfiguration vtnConfiguration, OadrCancelPartyRegistrationType oadrCancelPartyRegistrationType) { String venID = oadrCancelPartyRegistrationType.getVenID(); String requestID = oadrCancelPartyRegistrationType.getRequestID(); String registrationID = oadrCancelPartyRegistrationType.getRegistrationID(); int responseCode = HttpStatus.OK_200; if (getRegistration(vtnConfiguration).getRegistrationID().equals(registrationID)) { clearRegistration(vtnConfiguration); oadrPollService.cancelHttpScheduledPullRequestTask(vtnConfiguration, false); } else { responseCode = Oadr20bApplicationLayerErrorCode.INVALID_ID_452; } return Oadr20bEiRegisterPartyBuilders.newOadr20bCanceledPartyRegistrationBuilder( Oadr20bResponseBuilders.newOadr20bEiResponseBuilder(requestID, responseCode).build(), registrationID, venID).build(); }  OadrResponseType oadrRequestReregistration(VtnSessionConfiguration vtnConfiguration,
			OadrRequestReregistrationType oadrRequestReregistrationType); OadrCanceledPartyRegistrationType oadrCancelPartyRegistration(VtnSessionConfiguration vtnConfiguration,
			OadrCancelPartyRegistrationType oadrCancelPartyRegistrationType); void clearRegistration(VtnSessionConfiguration vtnConfiguration); void reinitRegistration(VtnSessionConfiguration vtnConfiguration); void initRegistration(VtnSessionConfiguration vtnConfiguration); void register(VtnSessionConfiguration vtnConfiguration, OadrCreatedPartyRegistrationType registration); OadrCreatedPartyRegistrationType getRegistration(VtnSessionConfiguration vtnConfiguration); void addListener(Oadr20bVENEiRegisterPartyServiceListener listener); Object handle(VtnSessionConfiguration vtnConfig, OadrPayload oadrPayload); void oadrCreatedPartyRegistration(VtnSessionConfiguration vtnConfig,
			OadrCreatedPartyRegistrationType oadrCreatedPartyRegistrationType); String request(String username, String payload); List<Oadr20bVENEiRegisterPartyServiceListener> getListeners();  }
@Test public void oadrCancelPartyRegistrationTest() throws Oadr20bApplicationLayerException, Oadr20bMarshalException, Oadr20bUnmarshalException, Oadr20bXMLSignatureValidationException, Oadr20bXMLSignatureException, OadrSecurityException, IOException { VtnSessionConfiguration multiConfig = multiVtnConfig.getMultiConfig(vtnHttpId); oadr20bVENEiRegisterPartyService.initRegistration(multiConfig); assertNotNull(oadr20bVENEiRegisterPartyService.getRegistration(multiConfig)); OadrCancelPartyRegistrationType cancelPartyRegistration = Oadr20bEiRegisterPartyBuilders .newOadr20bCancelPartyRegistrationBuilder("0", oadr20bVENEiRegisterPartyService.getRegistration(multiConfig).getRegistrationID(), venConfig.getVenId()) .build(); String request = oadr20bVENEiRegisterPartyService.request(vtnHttpId, oadr20bJAXBContext.marshalRoot(cancelPartyRegistration)); OadrCanceledPartyRegistrationType oadrCanceledPartyRegistration = oadr20bJAXBContext.unmarshal(request, OadrCanceledPartyRegistrationType.class); assertNotNull(oadrCanceledPartyRegistration); assertNull(oadr20bVENEiRegisterPartyService.getRegistration(multiConfig)); }