System.out.println("From the perspective of the application, lets test the");
System.out.println("encoding and usage of the P-Served-User header.");
System.out.println("******************************************************");
HeaderFactoryImpl himpl = new HeaderFactoryImpl();
AddressFactory addfact = new AddressFactoryImpl();
try {
PServedUserHeader psuh = himpl.createPServedUserHeader(addfact.createAddress(addfact.createSipURI("aayush", "rancore.com")));
psuh.setSessionCase("orig");
psuh.setRegistrationState("reg");
System.out.println("The encoded header is---> "+psuh.toString());
System.out.println("The sescase is---> "+psuh.getSessionCase());
System.out.println("The Regs state is--->"+psuh.getRegistrationState());