use of net.java.slee.resource.diameter.base.events.avp.ProxyInfoAvp in project jain-slee.diameter by RestComm.
the class BaseFactoriesTest method testAvpFactoryCreateProxyInfo.
@Test
public void testAvpFactoryCreateProxyInfo() {
ProxyInfoAvp piAvp1 = avpFactory.createProxyInfo(new DiameterIdentity("diameter.mobicents.org"), "INITIALIZED".getBytes());
Assert.assertNotNull("Created Proxy-Info AVP from objects should not be null.", piAvp1);
ProxyInfoAvp piAvp2 = avpFactory.createProxyInfo(piAvp1.getExtensionAvps());
Assert.assertEquals("Created Proxy-Info AVP from extension avps should be equal to original.", piAvp1, piAvp2);
ProxyInfoAvp piAvp3 = avpFactory.createProxyInfo(piAvp2.getProxyHost(), piAvp2.getProxyState());
Assert.assertEquals("Created Proxy-Info AVP from getters should be equal to original.", piAvp1, piAvp3);
}
use of net.java.slee.resource.diameter.base.events.avp.ProxyInfoAvp in project jain-slee.diameter by RestComm.
the class DiameterAvpFactoryImpl method createProxyInfo.
/*
* (non-Javadoc)
* @see net.java.slee.resource.diameter.base.DiameterAvpFactory#createProxyInfo(net.java.slee.resource.diameter.base.events.avp.DiameterIdentity, byte[])
*/
public ProxyInfoAvp createProxyInfo(DiameterIdentity proxyHost, byte[] proxyState) {
ProxyInfoAvp proxyInfo = createProxyInfo();
proxyInfo.setProxyHost(proxyHost);
proxyInfo.setProxyState(proxyState);
return proxyInfo;
}
Aggregations