use of net.java.slee.resource.diameter.cxdx.events.RegistrationTerminationRequest in project jain-slee.diameter by RestComm.
the class CxDxFactoriesTest method isProxiableCopiedRTA.
@Test
public void isProxiableCopiedRTA() throws Exception {
RegistrationTerminationRequest rtr = cxdxMessageFactory.createRegistrationTerminationRequest();
clientSession.fetchSessionData(rtr);
RegistrationTerminationAnswer rta = clientSession.createRegistrationTerminationAnswer();
assertEquals("The 'P' bit is not copied from request in Registration-Termination-Answer, it should. [RFC3588/6.2]", rtr.getHeader().isProxiable(), rta.getHeader().isProxiable());
// Reverse 'P' bit ...
((DiameterMessageImpl) rtr).getGenericData().setProxiable(!rtr.getHeader().isProxiable());
assertTrue("The 'P' bit was not modified in Registration-Termination-Request, it should.", rtr.getHeader().isProxiable() != rta.getHeader().isProxiable());
clientSession.fetchSessionData(rtr);
rta = clientSession.createRegistrationTerminationAnswer();
assertEquals("The 'P' bit is not copied from request in Registration-Termination-Answer, it should. [RFC3588/6.2]", rtr.getHeader().isProxiable(), rta.getHeader().isProxiable());
}
Aggregations